str icon indicating copy to clipboard operation
str copied to clipboard

Add move constructors

Open Reedbeta opened this issue 5 years ago • 0 comments

  • Move constructors and move assignment now supported on Str and its subclasses.
  • For local-buffered strings, does a copy; for heap-allocated strings, takes over the allocation from the move source; for unowned strings, points to the same memory as the move source.
  • Allows using Str and friends in containers like std::vector, without incurring extra allocations when the container is resized.

Reedbeta avatar Jul 12 '20 19:07 Reedbeta