I read some GCC bugreport and people there were talking about “vstring”. Searching the WEB I came to notice http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.2/vstring_8h.html .
Can someone please elaborate on what it is useful and used for? Why use it instead of std::string?
GCC’s
vstringis a versatile string class, which was introduced in GCC 4.1’slibstdc++implementation.It is compatible with
std::basic_string, with these additional details:vstring_fwd.hfor some useful typedefs.DR431 is Library Working Group Defect Report 431, with option 3 looking like implementing better allocator support for the class to allow better swapping and other allocator-related operations.
The basic details are from GCC 4.1’s release notes, under the Runtime Library section.
edit:
It looks as though the original purpose of this extension was to provide a basis for a C++11
std::stringimplementation. Paolo Carlini, a GCC/libstdc++ contributor, comments in this GCC Bug Report that<ext/vstring.h>contains a non-reference counted experimental version of the nextstd::string. Comment dated April 12, 2012: