lib/icu/Compare: allow copying
This commit is contained in:
parent
e8975942ec
commit
38d56dddf1
@ -37,6 +37,18 @@ public:
|
|||||||
|
|
||||||
explicit IcuCompare(const char *needle) noexcept;
|
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(IcuCompare &&) = default;
|
||||||
IcuCompare &operator=(IcuCompare &&) = default;
|
IcuCompare &operator=(IcuCompare &&) = default;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user