If you handle the overhead of dereferencing a pointer every time you access a string (I wouldn’t), you can always save the icu string to std::unique_ptr
, then moving around will be as easy as moving the pointer.
MyWrapper(MyWrapper && that) :str_ptr(std::move(that.str_ptr)) {}
Personally, I would feel better actually changing the source of the ICU.
source share