MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / enum_bit_and

Function enum_bit_and

3rdparty/cppzmq/zmq.hpp:1011–1016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1009 return static_cast<T>(static_cast<U>(a) | static_cast<U>(b));
1010}
1011template<class T> constexpr T enum_bit_and(T a, T b) noexcept
1012{
1013 static_assert(std::is_enum<T>::value, "must be enum");
1014 using U = typename std::underlying_type<T>::type;
1015 return static_cast<T>(static_cast<U>(a) & static_cast<U>(b));
1016}
1017template<class T> constexpr T enum_bit_xor(T a, T b) noexcept
1018{
1019 static_assert(std::is_enum<T>::value, "must be enum");

Callers 1

operator&Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected