Browse Source

Oops... default c'tor forgotten. And some trivial assignment operators as alias to .assign().

master
roker 4 years ago
parent
commit
70b9218839
  1. 6
      src/nfc.hh

6
src/nfc.hh

@ -98,7 +98,6 @@ public:
static const size_t npos = String::npos;
explicit nfc_string(StringView src);
explicit nfc_string(String && src);
@ -111,6 +110,7 @@ public:
: nfc_string{ StringView{src, length} }
{}
nfc_string() = default;
nfc_string(const nfc_string& src) = default;
nfc_string( nfc_string&& src) = default;
@ -119,7 +119,11 @@ public:
nfc_string& assign(StringView src);
nfc_string& assign(String && src);
nfc_string& assign(const CharT* src) { return this->assign(StringView{src}); }
nfc_string& operator=(StringView src) { return this->assign(src); }
nfc_string& operator=(String && src) { return this->assign(std::move(src)); }
nfc_string& operator=(const CharT* src) { return this->assign(StringView{src}); }
/// read-only: shares representation
operator const String&() const noexcept { return s; }

Loading…
Cancel
Save