ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
iterablebitset.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header file is part of module \alib_enums of the \aliblong.
4///
5/// \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7//==================================================================================================
8#ifndef HPP_ALIB_ENUMS_ITERABLE_BITSET
9#define HPP_ALIB_ENUMS_ITERABLE_BITSET 1
10#pragma once
12
14
15#include "alib/lang/bitset.hpp"
16
17namespace alib { namespace enums {
18#if DOXYGEN
19//==================================================================================================
20/// This is a using statement which is available (enabled) for enumerations for which traits struct
21/// \alib{enums;T_EnumIsIterable} is specialized. With this, the interface methods of templated
22/// class \alib{lang;TBitSet} accept and return enumeration elements.
23///
24/// @see For a quick tutorial on the use of this type, see chapter
25/// \ref alib_enums_iter_bitset "3.5 Using Class TBitSet with Iterable Enums" of the Programmer's
26/// Manual of module \alib_enums_nl.
27///
28/// @tparam TEnum The enum type to use with class \alib{lang;TBitSet}.
29/// \note Other than documented here, this using statement has a second template parameter
30/// \p{TEnableIf}. This parameter has a default expressions and <b>must not</b> be provided
31/// because it is used internally to ensure that only if a specialization of
32/// \alib{enums;T_EnumIsIterable;T_EnumIsIterable<TEnum>} exists, this type definition becomes
33/// available.
34/// (..and this is why it was explicitly 'faked out' of this documentation).
35//==================================================================================================
36template<typename TEnum>
37using EnumBitSet = TBitSet<TEnum, enums::T_EnumIsIterable<TEnum>::End,
39#else
40template<typename TEnum, typename TEnableIf
44#endif
45} // namespace alib[::enums]
46
47#if DOXYGEN
48
49/// Type alias in namespace \b alib.
50/// @see For more information, consult type definition \alib{enums;EnumBitSet}.
51template<typename TEnum>
54#else
55template<typename TEnum, typename TEnableIf
59#endif
60
61} // namespace [alib]
62
63#endif // HPP_ALIB_ENUMS_ITERABLE_BITSET
64
#define ALIB_ASSERT_MODULE(modulename)
Definition alib.hpp:223
#define ATMP_VOID_IF(Cond)
Definition tmp.hpp:47
#define ATMP_EQ( T, TEqual)
Definition tmp.hpp:27
TBitSet< TEnum, enums::T_EnumIsIterable< TEnum >::End, enums::T_EnumIsIterable< TEnum >::Begin > EnumBitSet
Definition alib.cpp:69