开发者

Standard Library Source File

I am using GCC on cygwin, but I want to browse for source file of string.cpp from the standard library . I just want to read the source file for knowledge of the function I am using, but the problem is I can't find it anywhere. I only find the header files but not the source files. I assume it is store somewhere else, or maybe in another form? lib? dll? If so, then how can I extract that out..

Thx开发者_如何学Go


std::string is actually a template specialization of std::basic_string for the normal char type. Template C++ tends to end up solely in header files.

I haven't used the gcc library implementation, but there may well be no cpp files (or only files for implementing heavy lifting).


On my installation, it's located in the vicinity of:

/usr/lib/gcc/i686-pc-cygwin/4.3.4/include/c++/string
/usr/lib/gcc/i686-pc-cygwin/4.3.4/include/c++/bits/basic_string.h

to find this sort of stuff:

cd /usr
find . | grep string
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜