util/AllocatedString: add default constructor
This commit is contained in:

committed by
Max Kellermann

parent
cfb7f8ab84
commit
32b7b2e2fa
@@ -55,12 +55,13 @@ public:
|
||||
static constexpr value_type SENTINEL = '\0';
|
||||
|
||||
private:
|
||||
pointer value;
|
||||
pointer value = nullptr;
|
||||
|
||||
explicit BasicAllocatedString(pointer _value) noexcept
|
||||
:value(_value) {}
|
||||
|
||||
public:
|
||||
BasicAllocatedString() noexcept = default;
|
||||
BasicAllocatedString(std::nullptr_t n) noexcept
|
||||
:value(n) {}
|
||||
|
||||
@@ -145,6 +146,7 @@ class AllocatedString : public BasicAllocatedString<char> {
|
||||
public:
|
||||
using BasicAllocatedString::BasicAllocatedString;
|
||||
|
||||
AllocatedString() noexcept = default;
|
||||
AllocatedString(BasicAllocatedString<value_type> &&src) noexcept
|
||||
:BasicAllocatedString(std::move(src)) {}
|
||||
};
|
||||
|
Reference in New Issue
Block a user