Skip to main content

All Questions

Filter by
Sorted by
Tagged with
4 votes
2 answers
3k views

Reference-counting of std::string

I'm looking at the code for basic_string (that is bundled with g++ 4.2.1). The copy constructor makes use of a grab() function to "grab" a copy of a string (increment its reference-count): _CharT* ...
Paul J. Lucas's user avatar