VBVX 0.1.0
Header-only C++23 library for safe, zero-copy parsing of packet buffers.
Loading...
Searching...
No Matches
vbvx::enable_bitmask_operators< _Tp > Struct Template Reference

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

#include <flags_view.hxx>

Inheritance diagram for vbvx::enable_bitmask_operators< _Tp >:

Detailed Description

template<typename _Tp>
struct vbvx::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 flags_view.hxx:25

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