llmx-rtaco 0.0.1
RTNL-only netlink control-plane library for Linux (C++23).
Loading...
Searching...
No Matches
llmx::rtaco::enable_bitmask_operators< _Tp > Struct Template Reference

Enable bitwise operators for an enum class. More...

#include <nl_utils.hxx>

Inheritance diagram for llmx::rtaco::enable_bitmask_operators< _Tp >:

Detailed Description

template<typename _Tp>
struct llmx::rtaco::enable_bitmask_operators< _Tp >

Enable bitwise operators for an enum class.

Specialize this template for your enum to enable the bitwise operators.

Example:

enum class MyFlags : uint8_t {
FlagA = 0x01,
FlagB = 0x02,
FlagC = 0x04
};
template <>
struct enable_bitmask_operators<MyFlags> : std::true_type {};
Enable bitwise operators for an enum class.
Definition nl_utils.hxx:26

The documentation for this struct was generated from the following file: