[cfe-commits] r151117 - in /cfe/trunk: include/clang/AST/ExprCXX.h include/clang/Sema/Sema.h lib/Parse/ParseDeclCXX.cpp lib/Sema/Sema.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaExprCXX.cpp lib/Sema/SemaOverload.cpp lib/Sema/TreeTransform.h test/CXX/d

Michel Morin mimomorin at gmail.com
Tue Feb 21 21:22:00 PST 2012


Richard Smith wrote:
> On Tue, Feb 21, 2012 at 8:38 PM, Michel Morin <mimomorin at gmail.com> wrote:
>> Is there any way to detect this C++11 decltype feature?
>> `__has_feature(cxx_decltype)` does not work,
>> since this macro also detects pre-N3276 decltype.
>> (Boost.Config needs to detect N3276 decltype.)
>
> There's no __has_feature check for it, but it's pretty easy to detect with
> SFINAE (check for SFINAE access control first if you want to use this
> particular approach):

Thanks, Richard!

This works for compile-time detection, but
Boost.Config needs preprocessing-time detection…

Regards,
Michel




More information about the cfe-commits mailing list