This fixes #121, pretty much just because it's wrong with little real-world benefit. The use of disableIfCopy is explained in the first commit.
After doing that i found a load more situations where strings can be moved rather than copied. This does seem worthwhile -- when running xml_parser_common_definitions_tests (which just parses common definitions and a simple document), about 1000 allocations (presumably string copies) are saved.
This fixes #121, pretty much just because it's wrong with little real-world benefit. The use of
disableIfCopy
is explained in the first commit.After doing that i found a load more situations where strings can be moved rather than copied. This does seem worthwhile -- when running xml_parser_common_definitions_tests (which just parses common definitions and a simple document), about 1000 allocations (presumably string copies) are saved.