C++ Logo

SG10

Advanced search

Subject: Re: [SG10] __has_cpp_attribute example
From: Nelson, Clark (clark.nelson_at_[hidden])
Date: 2016-10-12 18:09:27


> The usage model we've always documented for these __has_* macros in
> Clang is:
>
> #ifndef __has_cpp_attribute
> # define __has_cpp_attribute(x) 0
> #endif
>
> #if __has_cpp_attribute(deprecated)
> # define ATTR_DEPRECATED(msg) [[deprecated(msg)]]
> #else
>
> # define ATTR_DEPRECATED(msg)
>
> #endif

Does anyone have a better bid than this one?

Clark


SG10 list run by sg10-owner@lists.isocpp.org