Determining libstdc++ version at compile time

Benjamin Kosnik bkoz@redhat.com
Tue Mar 20 09:09:00 GMT 2001


> I just looked for that macro and saw that it exists
> on libstdc++-v3 but not on libstdc++-v2.  Is this correct?

yes

> #if (defined (__GLIBCPP__) && __GLIBCPP__ >= 20010301 )
>    v3 code here
> #else
>    v2 code here
> #endif

#if __GLIBCPP__
//v3
#else
//v2
#endif



More information about the Libstdc++ mailing list