Attribute | Value |
carries_dependency | 200809L |
deprecated | 201309L |
fallthrough | 201603L |
likely | 201803L |
maybe_unused | 201603L |
no_unique_address | 201803L |
nodiscard | 201907L |
noreturn | 200809L |
unlikely | 201803L |
#if 'z' - 'a' == 25 if ('z' - 'a' == 25)
#if __has_include(<optional>) # include <optional> # if __cpp_lib_optional >= 201603 # define have_optional 1 # endif #elif __has_include(<experimental/optional>) # include <experimental/optional> # if __cpp_lib_experimental_optional >= 201411 # define have_optional 1 # define experimental_optional 1 # endif #endif #ifndef have_optional # define have_optional 0 #endif
#if __has_cpp_attribute(acme::deprecated) # define ATTR_DEPRECATED(msg) [[acme::deprecated(msg)]] #else # define ATTR_DEPRECATED(msg) [[deprecated(msg)]] #endif ATTR_DEPRECATED("This function is deprecated") void anvil();— end example