c++ - How do I know which STL string implementation I'm using? -


Item 15 Effective STL says there are at least 6 different implementations of Study :: String. But if I should know what implementation I am using, how will I know which implementation I am using? Std :: does not see the string source code of GCC (this is all in .so file), so how can I find out? Nothing could be found, so in future I need to see such information, where can I find it?

& lt; String & gt; Look at the header and see the copyright? I will add to that, which I know, std :: string a typedef of basic_string , then now, of a template class, which I remember, only supports Kamu C ++ "Export" template, so all other compilers need to set and implement template class in header files. If you are using GCC then maybe & lt; String & gt; In the header you will find a large piece of string implementation (I will add that this is a common trick that calls to reduce the size of the non-temp class compiling to create a "template" / "proxy" call Therefore, not all implementations really need to be in the header file, and for this the specific case of std :: string can be defined at the top of the "string" library (LE Which might be because std :: string understands blank as a valid character)

Comments