summaryrefslogtreecommitdiff
path: root/asl/string.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-23 00:17:27 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2025-01-23 00:17:27 +0100
commite5acc1eaa7e342b64ccfaaef5ea502cd623e41d5 (patch)
treed02cba121cbcb1f64570003c5ae448a7ca7c2420 /asl/string.hpp
parent3bf981d5130ba745df5b279af211caf5cc68d8a1 (diff)
Add string_builder
Diffstat (limited to 'asl/string.hpp')
-rw-r--r--asl/string.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/asl/string.hpp b/asl/string.hpp
index fbeffe5..4750cd5 100644
--- a/asl/string.hpp
+++ b/asl/string.hpp
@@ -11,6 +11,13 @@ class string
{
buffer<char, Allocator> m_buffer;
+ explicit constexpr string(buffer<char, Allocator>&& buffer) :
+ m_buffer{ASL_MOVE(buffer)}
+ {}
+
+ template<allocator A>
+ friend class string_builder;
+
public:
constexpr string() requires default_constructible<Allocator> = default;
explicit constexpr string(Allocator allocator) : m_buffer{ASL_MOVE(allocator)} {}