StormByte C++ Library 1.2.0
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
bitmask.hxx File Reference
#include <StormByte/type_traits.hxx>
#include <StormByte/bitmask.txx>
Include dependency graph for bitmask.hxx:

Go to the source code of this file.

Classes

class  StormByte::Bitmask< Derived, E >
 CRTP wrapper that stores an unsigned enum as a flag set. More...
 

Namespaces

namespace  StormByte
 Root namespace of the StormByte suite.
 

Functions

template<Type::UnsignedEnum E>
constexpr E operator| (E a, E b) noexcept
 Bitwise OR for unsigned scoped enumerations.
 
template<Type::UnsignedEnum E>
constexpr E operator& (E a, E b) noexcept
 Bitwise AND for unsigned scoped enumerations.
 
template<Type::UnsignedEnum E>
constexpr E operator^ (E a, E b) noexcept
 Bitwise XOR for unsigned scoped enumerations.
 
template<Type::UnsignedEnum E>
constexpr E operator~ (E a) noexcept
 Bitwise NOT for unsigned scoped enumerations.
 

Function Documentation

◆ operator&()

template<Type::UnsignedEnum E>
constexpr E operator& ( a,
b 
)
constexprnoexcept

Bitwise AND for unsigned scoped enumerations.

Template Parameters
EEnumeration type (Type::UnsignedEnum).
Parameters
aLeft operand.
bRight operand.
Returns
E with bits of a and b.

◆ operator^()

template<Type::UnsignedEnum E>
constexpr E operator^ ( a,
b 
)
constexprnoexcept

Bitwise XOR for unsigned scoped enumerations.

Template Parameters
EEnumeration type (Type::UnsignedEnum).
Parameters
aLeft operand.
bRight operand.
Returns
E with bits of a xor b.

◆ operator|()

template<Type::UnsignedEnum E>
constexpr E operator| ( a,
b 
)
constexprnoexcept

Bitwise OR for unsigned scoped enumerations.

Template Parameters
EEnumeration type (Type::UnsignedEnum).
Parameters
aLeft operand.
bRight operand.
Returns
E with bits of a or b.

◆ operator~()

template<Type::UnsignedEnum E>
constexpr E operator~ ( a)
constexprnoexcept

Bitwise NOT for unsigned scoped enumerations.

Template Parameters
EEnumeration type (Type::UnsignedEnum).
Parameters
aOperand.
Returns
E with bits of a inverted.