8#ifndef HPP_ALIB_ENUMS_BW_IT_CONVERSION
9#define HPP_ALIB_ENUMS_BW_IT_CONVERSION 1
17#include "alib/enums/iterable.hpp"
40template<
typename TEnum>
46template<
typename TEnum>
51 #if !defined (HPP_ALIB_ENUMS_ITERABLE)
55 "ENUMS",
"Number out of bounds." )
57 return TEnum( 1 << number );
77template<
typename TEnum>
78static constexpr inline
79typename std::underlying_type<TEnum>::type
82template<
typename TEnum>
88 "No bits set in given enum value" )
90 "Multiple bits given with enum value" )
91 return static_cast<typename std::underlying_type<TEnum>::type>(
92 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