Hacker News new | ask | show | jobs
by zabzonk 1206 days ago
> std::string can store <=22 character strings without needing to allocate

implementation dependent - the c++ standard says nothing on this

1 comments

sure but this is how pretty much every implementation does it these days, so you should be able to safely rely on that (or just drop in your own version that provides that guarantee if you are really concerned about it)