The reason that smaller strings work and longer strings cause a problem, is probably due to the C++ Short String Optimisation.
The SSO allows smaller strings to put in to a fixed size buffer in the std::string class. Strings that don't fit into the buffer use a dynamically allocated buffer.
The SSO allows smaller strings to put in to a fixed size buffer in the std::string class. Strings that don't fit into the buffer use a dynamically allocated buffer.
Statistics: Posted by AndyD — Sat Feb 24, 2024 9:15 pm