3#if __cplusplus < 201103L
4#error "strongenumflag is only supported with c++11 or newer"
9#ifndef WIBBLE_STRONGENUMFLAG_H
10#define WIBBLE_STRONGENUMFLAG_H
16 std::is_enum< E >::value && !std::is_convertible< E, int >::value >;
18template<
typename Self >
45 return This(
a.store |
b.store );
49 return This(
a.store &
b.store );
53 return a.store ==
b.store;
57 return a.store !=
b.store;
60 constexpr bool has(
Self x )
const noexcept {
73template<
typename Self,
typename =
typename
74 std::enable_if< is_enum_class< Self >::value >::type >
80template<
typename Self,
typename =
typename
81 std::enable_if< is_enum_class< Self >::value >::type >
std::integral_constant< bool, std::is_enum< E >::value &&!std::is_convertible< E, int >::value > is_enum_class
Definition strongenumflags.h:16
constexpr StrongEnumFlags< Self > operator&(Self a, Self b) noexcept
Definition strongenumflags.h:82
constexpr StrongEnumFlags< Self > operator|(Self a, Self b) noexcept
Definition strongenumflags.h:75
Definition strongenumflags.h:19
This & operator|=(This o) noexcept
Definition strongenumflags.h:34
constexpr StrongEnumFlags() noexcept
Definition strongenumflags.h:24
friend constexpr bool operator!=(This a, This b) noexcept
Definition strongenumflags.h:56
This & operator&=(This o) noexcept
Definition strongenumflags.h:39
constexpr StrongEnumFlags(Self flag) noexcept
Definition strongenumflags.h:25
typename std::underlying_type< Self >::type UnderlyingType
Definition strongenumflags.h:22
constexpr StrongEnumFlags(UnderlyingType st) noexcept
Definition strongenumflags.h:28
friend constexpr This operator&(This a, This b) noexcept
Definition strongenumflags.h:48
StrongEnumFlags< Self > This
Definition strongenumflags.h:21
friend constexpr bool operator==(This a, This b) noexcept
Definition strongenumflags.h:52
friend constexpr This operator|(This a, This b) noexcept
Definition strongenumflags.h:44
constexpr bool has(Self x) const noexcept
Definition strongenumflags.h:60