This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to detect the presence of old iostreams


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]