[cfe-commits] [libc++] Switching to 'double underscore' notation for has_feature.

Jean-Daniel Dupas devlists at shadowlab.org
Thu Mar 1 23:50:02 PST 2012


It does not solve the "do not use identifier that can conflict with legitimate user macros" issue.

---------------
#define cxx_noexpect noexcept()

#if __has_feature(__cxx_noexpect__) || __has_feature(cxx_noexpect)

#endif
---------------
feat.cpp:4:40: error: builtin feature check macro requires a parenthesized identifier
#if __has_feature(__cxx_noexpect__) || __has_feature(cxx_noexpect)
                                       ^
feat.cpp:4:54: error: expected value in expression
#if __has_feature(__cxx_noexpect__) || __has_feature(cxx_noexpect)
                                                     ^
feat.cpp:2:31: note: expanded from macro 'cxx_noexpect'
#define cxx_noexpect noexcept()


Le 2 mars 2012 à 03:51, Michel Morin a écrit :

> Shouldn't we use
> 
> #if __has_feature(__xxxx__) || __has_feature(xxxx)
> 
> ?
> 
> 
> Michel

-- Jean-Daniel








More information about the cfe-commits mailing list