By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

Actual C++ Library Source Code

P: n/a

Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library? Stuff like:

namespace std {
class string {
// actual code in here
}
}
-Tomás
Apr 11 '06 #1
Share this Question
Share on Google+
11 Replies


P: n/a
"Tom?s" <NU**@null.null> wrote:
Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library?


I would imagine STLPort provides this:
http://www.stlport.org/

--
Marcus Kwok
Apr 11 '06 #2

P: n/a
"Tomás" <NU**@NULL.NULL> wrote:
Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library? Stuff like:

namespace std {
class string {
// actual code in here
}
}
-Tomás


All 'big' open source operating systems make available the full source
code for their libraries. Go to the web sites for any Linux
distribution, NetBSD, FreeBSD, OpenBSD, minix, OpenSolaris, etc.
For the STL in particular, search for STLport.
Apr 11 '06 #3

P: n/a
Tomás wrote:

Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library? Stuff like:

namespace std {
class string {
// actual code in here
}
}


Besides STLport?

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Apr 11 '06 #4

P: n/a
Phlip wrote:
Tom�s wrote:
Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library? Stuff like:

namespace std {
class string {
// actual code in here
}
}


Besides STLport?


Well, there's GNU as well...
Apr 11 '06 #5

P: n/a
Phlip <ph*******@gmail.com> wrote:
Besides STLport?


maybe this http://incubator.apache.org/stdcxx/ ?
B.

Apr 11 '06 #6

P: n/a
Phlip wrote:
Tom�s wrote:
Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library? Stuff like:

namespace std {
class string {
// actual code in here
}
}


Besides STLport?


Although it's not free, the Digital Mars C++ compiler CD comes with full
library source code. For a free version, there is of course the gnu
implementation.

-Walter Bright
www.digitalmars.com C, C++, D programming language compilers
Apr 11 '06 #7

P: n/a
In article <GO******************@news.indigo.ie>,
"Tomás" <NU**@NULL.NULL> wrote:
Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library? Stuff like:

namespace std {
class string {
// actual code in here
}
}


I can't believe no one mentioned this one.
<http://www.sgi.com/tech/stl/>

It's based on Hewlett-Packard's original code (as is gnu's version I
believe...)
--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Apr 11 '06 #8

P: n/a
"Daniel T." <po********@verizon.net> wrote:
"Tomás" <NU**@NULL.NULL> wrote:
Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library? Stuff like:


I can't believe no one mentioned this one.
<http://www.sgi.com/tech/stl/>

It's based on Hewlett-Packard's original code (as is gnu's version I
believe...)


I always thought of STLport, (that I and others mentioned,) as a
better, more up-to-date version of SGI's STL, on which it is based.

Are there any reasons to prefer SGI's STL over STLport?
Apr 11 '06 #9

P: n/a
In article <09********************************@4ax.com>,
Roberto Waltman <us****@rwaltman.net> wrote:
"Daniel T." <po********@verizon.net> wrote:
"Tomás" <NU**@NULL.NULL> wrote:
Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library? Stuff like:


I can't believe no one mentioned this one.
<http://www.sgi.com/tech/stl/>

It's based on Hewlett-Packard's original code (as is gnu's version I
believe...)


I always thought of STLport, (that I and others mentioned,) as a
better, more up-to-date version of SGI's STL, on which it is based.

Are there any reasons to prefer SGI's STL over STLport?


I'm thinking that Tomas wants to study the code to see how it works and
I expect that SGI's version is probably simpler than STLport (though I
could be wrong, I see now that SGI does still revise theirs.)

I think it would be most instructive for Tomas to try to implement his
own STL. :-)
--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Apr 12 '06 #10

P: n/a

Tomás wrote:
Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library? Stuff like:

namespace std {
class string {
// actual code in here
}
}


The GNU C++ library is probably the only option. Some other posts
mention
STLPort, but it's rather incomplete. It assumes that a large port of
the
C++ library is already present, and adds Standard Templates to the
Library
(Hence the "STL" in STLPort). For instance, std::string is
template-based
( basic_string<char> ) and is in STLPort; std::strlen() isn't.

Of course, many commercial compilers also include the actual sources of
their standard C++ libraries. Have you looked at yours?

HTH,
Michiel Salters

Apr 13 '06 #11

P: n/a
<Mi*************@tomtom.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...

Tomás wrote:
Is there anywhere on the internet where you can download actual source
code of an implementation of the C++ library? Stuff like:

namespace std {
class string {
// actual code in here
}
}


The GNU C++ library is probably the only option. Some other posts
mention
STLPort, but it's rather incomplete. It assumes that a large port of
the
C++ library is already present, and adds Standard Templates to the
Library
(Hence the "STL" in STLPort). For instance, std::string is
template-based
( basic_string<char> ) and is in STLPort; std::strlen() isn't.

---
[pjp] Actually, the two libraries have comparable coverage. Libstdc++
(the library shipped with gcc) is just the C++ part. It depends on
whatever local C library is provided by the OS. In the case of Linux,
that happens to be glibc, the (more or less) Standard C library that's
also part of Project GNU. On Solaris, it uses the C library from Sun.
On the Mac OS it's the FreeBSD C library. etc. etc. STLport does
essentially the same thing. (And hence, both libraries are missing
many of the additions to the C library mandated by the C++ Standard.)

Libstdc++ is designed to work only with gcc, while STLport endeavors
to some degree of portability. OTOH, Libstdc++ is still actively
maintained, while STLport has been in the doldrums for the past
several years. (In fact, the STLport support forums went "offline
for maintenance" about a month ago and never came back. What's left
of the volunteer maintenance effort can now be found on SourceForge.)
---

Of course, many commercial compilers also include the actual sources of
their standard C++ libraries. Have you looked at yours?

---
[pjp] Good suggestion.
---

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Apr 13 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.