lib/icu/Compare: allow copying

This commit is contained in:
Max Kellermann 2018-01-19 23:49:50 +01:00
parent e8975942ec
commit 38d56dddf1

View File

@ -37,6 +37,18 @@ public:
explicit IcuCompare(const char *needle) noexcept;
IcuCompare(const IcuCompare &src) noexcept
:needle(src
? AllocatedString<>::Duplicate(src.needle.c_str())
: nullptr) {}
IcuCompare &operator=(const IcuCompare &src) noexcept {
needle = src
? AllocatedString<>::Duplicate(src.needle.c_str())
: nullptr;
return *this;
}
IcuCompare(IcuCompare &&) = default;
IcuCompare &operator=(IcuCompare &&) = default;