C++ Attribute Overview
C++ attributes provide additional information to the compiler to enforce constraints
or enable code optimization
Attributes are annotation on top of standard code that can be applied to functions,
variables, classes, enumerator, types, etc.
C++11 introduces a standardized syntax for attributes: [[my-attribute]]
__attribute__((always_inline)) // < C++11, GCC/Clang/GNU compilers
__forceinline // < C++11, MSVC
[[gnu::always_inline]] // C++11, GCC/Clang/GNU compilers
[[msvc::forceinline]] // C++11, MSVC
In addtion, C++11 and later add standard attributes such as maybe unused ,
deprecated , and nodiscard
55/65