ALib C++ Library
by
Library Version:
2510 R0
Documentation generated by
Loading...
Searching...
No Matches
home
dev
A-Worx
ALib
src
alib
enumops
enumops.prepro.hpp
Go to the documentation of this file.
1
//==================================================================================================
2
/// \file
3
/// This header-file is part of the \aliblong.
4
///
5
/// \emoji :copyright: 2013-2025 A-Worx GmbH, Germany.
6
/// Published under \ref mainpage_license "Boost Software License".
7
//==================================================================================================
8
#ifndef HPP_ALIB_ENUMOPS_PP
9
#define HPP_ALIB_ENUMOPS_PP
10
#pragma once
11
12
#ifndef INL_ALIB
13
# include "
alib/alib.inl
"
14
#endif
15
16
// #################################################################################################
17
// Symbols introduced by module ALib.Enums
18
// #################################################################################################
19
#define ALIB_ENUMS_MAKE_ARITHMETICAL(TEnum) \
20
namespace alib::enumops { \
21
template<> struct ArithmeticalTraits<TEnum> : std::true_type {}; } \
22
23
#define ALIB_ENUMS_MAKE_BITWISE(TEnum) \
24
namespace alib::enumops { \
25
template<> \
26
struct BitwiseTraits<TEnum> : std::true_type {}; }
27
28
#define ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END(TEnum, StartElement, StopElement ) \
29
namespace alib::enumops { \
30
template<> struct IterableTraits<TEnum> : std::true_type \
31
{ \
32
static constexpr TEnum Begin = StartElement; \
33
static constexpr TEnum End = StopElement; \
34
};}
35
36
#define ALIB_ENUMS_MAKE_ITERABLE(TEnum, StopElement ) \
37
ALIB_ENUMS_MAKE_ITERABLE_BEGIN_END( TEnum, TEnum(0), StopElement )
38
39
#endif
// HPP_ALIB_ENUMOPS_PP
40
alib.inl