Autoconf test for v3/ext namespace?

Jonathan Lennox lennox@cs.columbia.edu
Mon Jul 1 12:02:00 GMT 2002


GCC 3.1 (correctly) changed the namespace for symbols in the header files in
libstdc++'s 'ext' directory, such as <ext/hash_map>, from std:: to
__gnu_cxx::.

I want to write code that uses these extensions, and I want it to work both
with gcc 3.0 and 3.1.  Obviously, to do this, I'm going to need to have
different 'using' statements depending on which version of the compiler I'm
using; I'd like to use autoconf to determine this.

Does anyone have an autoconf test that can determine whether a C++ header
file defines a particular namespace-qualified symbol?

Ideally this would be one that works with autoconf 2.13, but I can upgrade
my autoconf to 2.5x if necessary.

Thanks!

-- 
Jonathan Lennox
lennox@cs.columbia.edu



More information about the Gcc-help mailing list