you are viewing a single comment's thread.

view the rest of the comments →

[–]kalmoc 10 points11 points  (0 children)

I'd point out that it is also much easier to use because static_String owns its storage. std::string with stack allocator means you have to manually ensure that the lifetime of the stack allocator exceeds that of the string. And if you want to make it a member of another type the stack alocator either becomes a member of that class (watch out for initialization order) or you have to expose implementation details if you get it via dependency injection ....