This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: How to detect the presence of old iostreams
- From: Phil Edwards <phil at jaj dot com>
- To: Gennaro Prota <gennaro_prota at yahoo dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 11 Sep 2002 15:06:28 -0400
- Subject: Re: How to detect the presence of old iostreams
- References: <20020911165952.38758.qmail@web20107.mail.yahoo.com>
On Wed, Sep 11, 2002 at 09:59:52AM -0700, Gennaro Prota wrote:
> Hi everybody,
> a simple but very important question for the boost library:
>
> Which versions of libstdc++ had old iostreams only?
Version 2 of GCC shipped with version 2 of libstdc++.
Version 3 of GCC ships with version 3 of libstdc++, and it's version
3 that contains the rewrites and the new iostreams (along with a new
everything else).
> #if defined (__GLIBCPP__) && !defined (_GLIBCPP_DEPRECATED)
__GLIBCPP__ is purely a version 3 thing, so if it's defined at all you
are using version 3.
Since in this case you can also make the same distinction between versions
of the compiler, testing against __GNUC__ (for 2 or 3) would accomplish
the same thing. Version 3 of the library cannot be built/used with version
2 of the compiler.
GLIBCPP_DEPRECATED does something different than what you think it does
here. :-) The comment in c++config is a tad misleading.
Phil
--
I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
- Edsger Dijkstra, 1930-2002