This header-file is part of the ALib C++ Framework.
© 2013-2025 A-Worx GmbH, Germany. Published under Boost Software License.
Definition in file enumops.prepro.hpp.
#include "alib/alib.inl"Go to the source code of this file.
Macros | |
| #define | ALIB_ENUMS_MAKE_ARITHMETICAL(TEnum) |
| #define | ALIB_ENUMS_MAKE_BITWISE(TEnum) |
| #define | ALIB_ENUMS_MAKE_ITERABLE(TEnum, StopElement) |
| #define | ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END(TEnum, StartElement, StopElement) |
| #define ALIB_ENUMS_MAKE_ARITHMETICAL | ( | TEnum | ) |
Specializes the type trait ArithmeticalTraits to inherit std::true_type to enable a set of arithmetic operators on the elements of TEnum.
Usually, this macro is placed in a header-file, probably close to the enum type definition. However, it has to be placed in global (no) namespace.
| TEnum | Type of a scoped or non-scoped enumeration that is to be declared an arithmetical type. |
Definition at line 19 of file enumops.prepro.hpp.
| #define ALIB_ENUMS_MAKE_BITWISE | ( | TEnum | ) |
Specializes the type trait BitwiseTraits to inherit std::true_type.
Usually, this macro is placed in a header-file, probably close to the enum type definition. However, it has to be placed in global (no) namespace.
| TEnum | Type of a scoped or non-scoped enumeration that is to be declared a bitwise type. |
Definition at line 23 of file enumops.prepro.hpp.
| #define ALIB_ENUMS_MAKE_ITERABLE | ( | TEnum, | |
| StopElement ) |
Shortcut to ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END, providing TEnum(0) as macro parameter StartElement.
Usually, this macro is placed in a header-file, probably close to the enum type definition. However, it has to be placed in global (no) namespace.
| TEnum | Type of a scoped or non-scoped enumeration that is to be declared an iterable enum type. |
| StopElement | The enum element after the last "valid" element in the enumeration. Will be used as constexpr static constexpr TEnum End. |
Definition at line 36 of file enumops.prepro.hpp.
| #define ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END | ( | TEnum, | |
| StartElement, | |||
| StopElement ) |
Specializes the type trait IterableTraits to implement methods:
Usually, this macro is placed in a header-file, probably close to the enum type definition. However, it has to be placed in global (no) namespace.
| TEnum | Type of a scoped or non-scoped enumeration that is to be declared an iterable enum type. |
| StartElement | The first element of the enumeration. Will be used as constexpr static constexpr TEnum End. |
| StopElement | The enum element after the last "valid" element in the enumeration. Will be used as constexpr static constexpr TEnum End. |
Definition at line 28 of file enumops.prepro.hpp.