help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading source code of string library implementation in GNU C++


From: Guy Harrison
Subject: Re: Reading source code of string library implementation in GNU C++
Date: Fri, 07 Jan 2005 23:00:11 GMT
User-agent: KNode/0.7.7

rakesh_usenet@yahoo.com wrote:

> Hi,
> I had recently downloaded the most recent version of GNU G++ source
> code -
> ftp://mirrors.usc.edu/pub/gnu/gcc/gcc-3.4.3/gcc-g++-3.4.3.tar.bz2 .
> 
> I unzipped the same and here are the contents.
> 
> $ ls -al
> total 16
> drwxr-xr-x   3 root root 4096 Jan  3 22:16 gcc/
> drwxrwxrwx  11  515  515 4096 Nov  4 20:13 libstdc++-v3/
> 
> I want to read about the string library implementation (the
> implementation behind
> #include <string> ) .
> 
> I am just curious as to where i should start. Also are there any
> specific guidelines available related to reading the GNU C++ STL
> implmentation as I want to dig deeper into them as time goes on.

You're better off looking at a working g++ installation because you can test
it with code...

g++ -v -o c c.cpp

...tells you the search paths. EG: for my system compiler (you can have
various gcc versions installed) I'd be looking in...

/usr/include/c++/3.3/

...once you've found your "base path" locate file called "string" (equates
to <string>) in which you'll discover most of the guts are pulled in via
include files referencing the "bits/" folder.

Note this is one specific implementation. Precise implementation details are
compiler specific (for efficiency reasons) and will use compiler specific
options. However, reguardless of which compiler used, all implementations
are supposed to adhere to the standard. For that, take a peek at the FAQ
for alt.comp.lang.learn.c.c++ which has numerous STL references.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]