This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Determining libstdc++ version at compile time
- To: libstdc++ at gcc dot gnu dot org
- Subject: Determining libstdc++ version at compile time
- From: Craig Rodrigues <rodrigc at mediaone dot net>
- Date: Mon, 19 Mar 2001 20:28:32 -0500
Hi,
I'm looking at maintaining a piece of code which uses
some low-level functions in the libstdc++-v2 iostreams
implementation, and need to keep that code portable
between v2 and v3.
What is the preferred method of determining the libstdc++
version at compile time?
Someone recommended to me that using some preprocessor macro
logic like:
#if ( defined(__GNUC__) && defined(_CPP_STREAMBUF) )
v3 specific iostreams code here
#else
v2 specific iostreams code here
#endif
I don't like relying on the _CPP_STREAMBUF macro.
Is there another macro which can tell me the version of
the libstdc++ library instead?
Thanks.
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@mediaone.net