8#ifndef HPP_ALIB_ENUMS_BW_IT_CONVERSION
9#define HPP_ALIB_ENUMS_BW_IT_CONVERSION 1
11#if !defined(HPP_ALIB) && !defined(ALIB_DOX)
17#if !defined (HPP_ALIB_ENUMS_ITERABLE)
21#if !defined(HPP_ALIB_LANG_BITS)
46template<
typename TEnum>
52template<
typename TEnum>
57 #if !defined (HPP_ALIB_ENUMS_ITERABLE)
61 "ENUMS",
"Number out of bounds." )
63 return TEnum( 1 << number );
85template<
typename TEnum>
86static constexpr inline
87typename std::underlying_type<TEnum>::type
90template<
typename TEnum>
96 "No bits set in given enum value" )
98 "Multiple bits given with enum value" )
99 return static_cast<typename std::underlying_type<TEnum>::type>(
100 lang::MSB( UnderlyingIntegral(element) ) - 1 );
#define ALIB_ASSERT_MODULE(modulename)
#define ALIB_ASSERT_ERROR(cond,...)
#define ATMP_T_IF(T, Cond)
constexpr TEnum ToBitwiseEnumeration(typename std::underlying_type< TEnum >::type number)
static constexpr std::underlying_type< TEnum >::type ToSequentialEnumeration(TEnum element)
constexpr std::underlying_type< TEnum >::type UnderlyingIntegral(TEnum element) noexcept(true)