* Pallav singh:
how to get the STL Library version used by compiler ? is it linked to g
++ version ?
There's no such thing in the standard.
The standard requires a macro __cplusplus that tells you that the compiler
implements the C++98 standard -- not very useful.
With the Dinkumware implementation of the standard library for Visual C++ you
have a macro _CPPLIB_VER that tells you which version of the Dinkumware headers
are used.
Perhaps some corresponding macro exists for g++.
In other words, read the documentation.
But the best advice is to not let your code depend on such knowledge.
If your code is correct, then if it compiles it should work, and if not then I
don't think there's any way to capitalize on version knowledge.
Cheers & hth.,
- Alf