1 #ifndef JSS_BITMASK_HPP 2 #define JSS_BITMASK_HPP 44 typename std::enable_if<enable_bitmask_operators<E>::enable,E>::type
46 typedef typename std::underlying_type<E>::type underlying;
47 return static_cast<E>(
48 static_cast<underlying>(lhs) | static_cast<underlying>(rhs));
52 typename std::enable_if<enable_bitmask_operators<E>::enable,E>::type
54 typedef typename std::underlying_type<E>::type underlying;
55 return static_cast<E>(
56 static_cast<underlying>(lhs) & static_cast<underlying>(rhs));
60 typename std::enable_if<enable_bitmask_operators<E>::enable,E>::type
62 typedef typename std::underlying_type<E>::type underlying;
63 return static_cast<E>(
64 static_cast<underlying>(lhs) ^ static_cast<underlying>(rhs));
68 typename std::enable_if<enable_bitmask_operators<E>::enable,E>::type
70 typedef typename std::underlying_type<E>::type underlying;
71 return static_cast<E>(
72 ~static_cast<underlying>(lhs));
76 typename std::enable_if<enable_bitmask_operators<E>::enable,E&>::type
78 typedef typename std::underlying_type<E>::type underlying;
80 static_cast<underlying>(lhs) | static_cast<underlying>(rhs));
85 typename std::enable_if<enable_bitmask_operators<E>::enable,E&>::type
87 typedef typename std::underlying_type<E>::type underlying;
89 static_cast<underlying>(lhs) & static_cast<underlying>(rhs));
94 typename std::enable_if<enable_bitmask_operators<E>::enable,E&>::type
96 typedef typename std::underlying_type<E>::type underlying;
98 static_cast<underlying>(lhs) ^ static_cast<underlying>(rhs));
std::enable_if< enable_bitmask_operators< E >::enable, E >::type operator &(E lhs, E rhs)
Definition: bitmask_operators.h:53
std::enable_if< enable_bitmask_operators< E >::enable, E >::type operator~(E lhs)
Definition: bitmask_operators.h:69
static const bool enable
Definition: bitmask_operators.h:40
Definition: bitmask_operators.h:39
std::enable_if< enable_bitmask_operators< E >::enable, E >::type operator|(E lhs, E rhs)
Definition: bitmask_operators.h:45
std::enable_if< enable_bitmask_operators< E >::enable, E & >::type operator^=(E &lhs, E rhs)
Definition: bitmask_operators.h:95
std::enable_if< enable_bitmask_operators< E >::enable, E & >::type operator&=(E &lhs, E rhs)
Definition: bitmask_operators.h:86
std::enable_if< enable_bitmask_operators< E >::enable, E >::type operator^(E lhs, E rhs)
Definition: bitmask_operators.h:61
std::enable_if< enable_bitmask_operators< E >::enable, E & >::type operator|=(E &lhs, E rhs)
Definition: bitmask_operators.h:77