native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
Attribute Detection

macros for determining supported attributes More...

Collaboration diagram for Attribute Detection:

Macros

#define native_has_attribute(__x)
 __has_attribute(x)
#define native_diagnose_if(condition, message)
 Reject a call when Clang can prove that its arguments violate a precondition.
#define native_has_declspec_attribute(__x)
 portable __has_declspec_attribute(__x)

Detailed Description

macros for determining supported attributes

Macro Definition Documentation

◆ native_diagnose_if

#define native_diagnose_if ( condition,
message )

Reject a call when Clang can prove that its arguments violate a precondition.

Place after the function declarator and any trailing requires clause. The condition can name parameters. An unknown condition leaves the call valid; this annotation adds no runtime check and does not affect overload selection.

Definition at line 50 of file attributes.h.

◆ native_has_attribute

#define native_has_attribute ( __x)
Value:
0

__has_attribute(x)

Used as the primary means for detecting advanced annotation features

Definition at line 34 of file attributes.h.

◆ native_has_declspec_attribute

#define native_has_declspec_attribute ( __x)
Value:
0

portable __has_declspec_attribute(__x)

Defaults to 1 on MSVC, where we can assume __declspec(x) is well supported.

Uses the __has_declspec_attribute(x) implementation in Clang

Defaults to 0 otherwise.

Definition at line 71 of file attributes.h.