[GCC-XML] gccxml, boost/typeof/typeof.hpp, and msvc 9.0sp1

Brad King brad.king at kitware.com
Tue Jul 6 08:04:27 EDT 2010


On 07/02/2010 06:17 PM, Christopher Bruns wrote:
> I could use some advice on how to get gccxml working with certain boost headers.
> 
> // test.hpp
> #include <boost/typeof/typeof.hpp>
> // end of test.hpp
> 
> Running gccxml (built from cvs head as of July 2, 2010) yields:
> 
> In file included from C:/Program
> Files/boost/boost_1_43_0/boost/typeof/typeof.hpp:103,
>                  from test.hpp:1:
> C:/Program Files/boost/boost_1_43_0/boost/typeof/msvc/typeof_impl.hpp:151:
> error: qualified name does not name a class before '{' token

The code in question appears on a block of the form

#if BOOST_WORKAROUND(BOOST_MSVC,==1300)
// Code specific to VC 7.0.
#elif BOOST_WORKAROUND(BOOST_MSVC,>=1400)
// Code for VC 8.0 and above.
#else
// Code commented with "This uses nice VC6.5 and VC7.1 bugfeature"
// that does not work with gccxml.  Error is reported here.
#endif

You'll have to do some preprocessor debugging to see why gccxml
and boost's code are not choosing the middle block for that
compiler.  The gccxml preprocessor simulates the definitions
of the target compiler, but adds __GCCXML__ to distinguish
itself.

-Brad



More information about the gccxml mailing list