Sign in to follow this  
blinky41

C++STL

Recommended Posts

dave    2187
It's a mess in Visual Studio 6, whatever that compiler is called. But it should be fine on all modern compilers.

Which are you thinking of using?

Share this post


Link to post
Share on other sites
ApochPiQ    23059
The C++ Standard Library is available in all standards-compliant C++ compilers, more or less by definition. Note that, as alluded to by Dave, Visual Studio 6 is not a standard-compliant compiler.

Share this post


Link to post
Share on other sites
MrAccident    232
Quote:
Original post by blinky41
What about on the Xbox 360 or PS3?

Huh? What exactly are you asking? Neither of those are C++ compilers. But there are C++ compilers available for those platforms, and if they are standards-compliant, then they support STL by definition. I'm not sure if that answers your question, since I'm not entirely sure what your question was, but such as it is. [smile]

Share this post


Link to post
Share on other sites
ApochPiQ    23059
Microsoft's bundled implementation of the C++SL works fairly well on both the Xbox and the 360. Note that you may wish to write custom allocators for STL containers to help alleviate certain classes of performance problems.

Share this post


Link to post
Share on other sites
Zahlman    1682
Please note that "the STL" is not an appropriate term to apply here. We are talking about the C++ standard library. Being the standard library, it stands to reason that any standards-compliant compiler will provide it.

The STL both includes things that are not in the C++ standard library (such as the function iota(), which fills a container with elements in arithmetic sequence with a difference of 1), and omits (many) things which are in the C++ standard library (for example, all the stream libraries - the STL is concerned with *only* containers and algorithms).

Share this post


Link to post
Share on other sites
_goat    804
I use the STL as in STandard Library. Its use is so widespread you should probably just let it go, Zahlman.

Share this post


Link to post
Share on other sites
iMalc    2466
The term SC++L (Standard C++ Library) is being used a bit, and hopefully catching on. Us 'Engineers' like to use precise and unambiguous terms, therefore the term SC++L should be adopted instead of STL. (Behind Zahlman all the way[smile])

btw, I'm back again after sorting out an issue with resetting my password after the ten day outage a while ago.

Share this post


Link to post
Share on other sites
jyk    2094
Quote:
Original post by _goat
I use the STL as in STandard Library. Its use is so widespread you should probably just let it go, Zahlman.
Not to be contrary, but redefining the abbreviation STL to mean STandard Library seems a little questionable to me. Can you provide any links to examples of similar usage? (I'm not trying to be difficult - I'm just curious.)

As for encouraging correct terminology, views differ depending on the person and on the particular terminology in question.

Although it's not a direct parallel, the battle over 'binormal vs. bitangent' is a good example of this. I think it's pretty clear that the correct term is to be preferred in this particular case, regardless of how widespread the use of the term 'binormal' in this context might be. Some might argue that the difference between 'STL' and 'Standard C++ Library' is less critical, conceptually speaking. However, a lot of folks on these forums are just discovering the library (whatever you call it), and I don't see why they shouldn't be encouraged to refer to it using the correct term.

Also, if my understanding of current developments in the language is correct, the standard library is in the process of being expanded considerably (see e.g. tr1), in light of which the term 'STL' becomes even less accurate when used to refer to the C++ standard library as a whole.

Again, not trying to be contrary or difficult. However, I do have to put in a vote for proper usage (and the encouragement thereof) in this case.

Share this post


Link to post
Share on other sites
MaulingMonkey    1730
Quote:
Original post by jyk
Quote:
Original post by _goat
I use the STL as in STandard Library. Its use is so widespread you should probably just let it go, Zahlman.
Not to be contrary, but redefining the abbreviation STL to mean STandard Library seems a little questionable to me.


Agreed. I prefer SC++L. Contrasting the old term against the new, which makes it clear in no uncertain terms that it's a basic part of the C++ "platform", helps underscore the point being made. "Let it go" my furry behind -- we're using it as a teaching tool, not just terminology nazing.

Quote:
Original post by blinky41
is STL supported on all C++ compilers?


The C++ standard, which has been around some 8 years now, mandates that what was known as the STL -- now part of the Standard C++ Library -- be implemented on any platform that can support it. Basically anything with a hard drive. That said, in theory, a compiler for an embedded system such as a handheld can omit large parts of the library.

As others have noted, Visual Studio 6 has a somewhat broken SC++L implementation. It predates the C++ standard, at some 9 years of age, screws up a lot of C++ besides just the library, and generally doesn't find itself listed among things I would consider a C++ compiler.

Especially given there are modern versions of Visual Studio with great C++ support (library included), even available for freely from Microsoft (google "Visual Studio 2005 Express").

Share this post


Link to post
Share on other sites
Quote:
Original post by _goat
I use the STL as in STandard Library. Its use is so widespread you should probably just let it go, Zahlman.


Standard Template Library is the correct name - so using it as you do is something I consider as questionable too - specifically because it's quite confusing.

The STL is a subpart of the SC++L (which contains many other things, including C-inheritead headers and a stream library). As per the C++ standard itself (somewhere in chapter 17), the official name of the standardized C++ library is Standard C++ Library - so that's not about using an old name, that's about using the correct one [smile].

And Visual C++ 6 is anything BUT a C++ compiler (for the reason given by MaulingMonkey) . It looks like it can compile some code that looks like a subset of C++.

Regards,

Share this post


Link to post
Share on other sites
Zahlman    1682
Quote:
Original post by Emmanuel Deloget
The STL is a subpart of the SC++L (which contains many other things, including C-inheritead headers and a stream library).


Only in the sense that C is a subset of C++ (which is to say, not really). :) There are STL things that didn't make it into C++, as I pointed out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this