ATLAS Offline Software
|
Compatibility helpers for using some pieces of C++20 concepts with older compilers. More...
#include <type_traits>
#include <iterator>
Go to the source code of this file.
Macros | |
#define | HAVE_CONCEPTS 0 |
#define | ATH_REQUIRES(...) |
#define | ATH_MEMBER_REQUIRES(CONDITION, RETTYPE) |
#define | ATH_MEMBER_REQUIRES_DEF(CONDITION, RETTYPE) |
Compatibility helpers for using some pieces of C++20 concepts with older compilers.
The body of the ATH_REQUIRES will be hidden for compilers that don't support concepts.
ATH_MEMBER_REQUIRES can be used to selectively enable a member function. Example:
declares a function foo
returning double
that is enabled only if T
is an int
. If you have a definition separate from the declaration, then use ATH_MEMBER_REQUIRES_DEF in the definition instead.
Will use a requires
clause with C++20 and enable_if
otherwise.
Definition in file concepts.h.
#define ATH_MEMBER_REQUIRES | ( | CONDITION, | |
RETTYPE | |||
) |
Definition at line 113 of file concepts.h.
#define ATH_MEMBER_REQUIRES_DEF | ( | CONDITION, | |
RETTYPE | |||
) |
Definition at line 117 of file concepts.h.
#define ATH_REQUIRES | ( | ... | ) |
Definition at line 111 of file concepts.h.
#define HAVE_CONCEPTS 0 |
Definition at line 109 of file concepts.h.