@# microsoft extension ?

Hi dear all,
How about this error ?
E:\SRC\LIBS\boost_1_49_0\boost/type_traits/detail/is_mem_fun_pointer_tester.hpp:
2669:1: error:
      expected unqualified-id
@#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
^
I've enabled microsoft extension mode with -fms-extensions, why did
still get this ? Many thanks .

This extension probably isn't implemented yet. (What does it do?)

Nico

I don't know yet. But there does exists a diagnostic named
ext_charize_microsoft which says @# is a microsoft extension

#@ is a microsoft extension: it's the charize operator:
#define FOO(a) #@a
FOO(x) -> 'x'

There doesn't appear to be a @# extension that is used as an alternate directive start. It appears to me like this is an escaping mechanism used by TypeTraits' code generation mechanism. You should ask on the Boost list.

Sebastian

OK. I think I'm misled by a typo in the help of ext_charize_microsoft
diag which
type #@ as @#.
But I can comiple the same file with MSVC. Is @# really another
Microsoft extension that is not implemented yet as Nico said ? Many
thanks

Are you sure the Microsoft compiler ever sees that code? Note that big parts of the file are conditional on some macros. In particular, the part that contains @# will be ignored if BOOST_TT_PREPROCESSING_MODE is not defined, which should be the default.

The real question is why Clang ever sees that code or tries to interpret it.

The comments in the file indicate that you should never use BOOST_TT_PREPROCESSING_MODE for a real compilation. Instead, you should invoke GNU cpp directly to generate code. This would be why these directives are "escaped": so that they show up in the generated code.

Sebastian