Maipa's Standard Library Extension 1.5.6
mstd
Loading...
Searching...
No Matches
mstd::flags< BitsEnum > Class Template Reference

#include <flags.hpp>

Collaboration diagram for mstd::flags< BitsEnum >:
[legend]

Public Types

using bits_type = BitsEnum
using value_type = std::underlying_type_t<BitsEnum>

Public Member Functions

_MSTD_CONSTEXPR17 flags () noexcept=default
_MSTD_CONSTEXPR17 flags (const flags &other) noexcept=default
_MSTD_CONSTEXPR17 flags (flags &&other) noexcept=default
_MSTD_CONSTEXPR17 flags (const bits_type bit) noexcept
_MSTD_CONSTEXPR17 flags (const value_type flags) noexcept
_MSTD_CONSTEXPR20 ~flags () noexcept=default
_MSTD_CONSTEXPR17 flagsoperator= (const flags &other) noexcept=default
_MSTD_CONSTEXPR17 flagsoperator= (flags &&other) noexcept=default
_MSTD_CONSTEXPR17 bool contains (const flags other) const noexcept
_MSTD_CONSTEXPR17 value_type value () const noexcept
_MSTD_CONSTEXPR17 operator value_type () const noexcept
_MSTD_CONSTEXPR17 flags operator| (const flags other) const noexcept
_MSTD_CONSTEXPR17 flags operator& (const flags other) const noexcept
_MSTD_CONSTEXPR17 flags operator^ (const flags other) const noexcept
_MSTD_CONSTEXPR17 flagsoperator|= (const flags other) noexcept
_MSTD_CONSTEXPR17 flagsoperator&= (const flags other) noexcept
_MSTD_CONSTEXPR17 flagsoperator^= (const flags other) noexcept
_MSTD_CONSTEXPR17 bool operator== (const flags other) const noexcept
_MSTD_CONSTEXPR17 bool operator!= (const flags other) const noexcept
_MSTD_CONSTEXPR17 flags operator~ () const noexcept
_MSTD_CONSTEXPR17 bool operator! () const noexcept
_MSTD_CONSTEXPR17 operator bool () const noexcept

Private Attributes

value_type _flags = 0

Member Typedef Documentation

◆ bits_type

template<class BitsEnum>
using mstd::flags< BitsEnum >::bits_type = BitsEnum

◆ value_type

template<class BitsEnum>
using mstd::flags< BitsEnum >::value_type = std::underlying_type_t<BitsEnum>

Constructor & Destructor Documentation

◆ flags() [1/5]

template<class BitsEnum>
_MSTD_CONSTEXPR17 mstd::flags< BitsEnum >::flags ( )
defaultnoexcept

◆ flags() [2/5]

template<class BitsEnum>
_MSTD_CONSTEXPR17 mstd::flags< BitsEnum >::flags ( const flags< BitsEnum > & other)
defaultnoexcept

◆ flags() [3/5]

template<class BitsEnum>
_MSTD_CONSTEXPR17 mstd::flags< BitsEnum >::flags ( flags< BitsEnum > && other)
defaultnoexcept

◆ flags() [4/5]

template<class BitsEnum>
_MSTD_CONSTEXPR17 mstd::flags< BitsEnum >::flags ( const bits_type bit)
inlinenoexcept

◆ flags() [5/5]

template<class BitsEnum>
_MSTD_CONSTEXPR17 mstd::flags< BitsEnum >::flags ( const value_type flags)
inlineexplicitnoexcept

◆ ~flags()

template<class BitsEnum>
_MSTD_CONSTEXPR20 mstd::flags< BitsEnum >::~flags ( )
defaultnoexcept

Member Function Documentation

◆ contains()

template<class BitsEnum>
_MSTD_CONSTEXPR17 bool mstd::flags< BitsEnum >::contains ( const flags< BitsEnum > other) const
inlinenodiscardnoexcept

◆ operator bool()

template<class BitsEnum>
_MSTD_CONSTEXPR17 mstd::flags< BitsEnum >::operator bool ( ) const
inlinenodiscardnoexcept

◆ operator value_type()

template<class BitsEnum>
_MSTD_CONSTEXPR17 mstd::flags< BitsEnum >::operator value_type ( ) const
inlineexplicitnodiscardnoexcept

◆ operator!()

template<class BitsEnum>
_MSTD_CONSTEXPR17 bool mstd::flags< BitsEnum >::operator! ( ) const
inlinenodiscardnoexcept

◆ operator!=()

template<class BitsEnum>
_MSTD_CONSTEXPR17 bool mstd::flags< BitsEnum >::operator!= ( const flags< BitsEnum > other) const
inlinenodiscardnoexcept

◆ operator&()

template<class BitsEnum>
_MSTD_CONSTEXPR17 flags mstd::flags< BitsEnum >::operator& ( const flags< BitsEnum > other) const
inlinenodiscardnoexcept

◆ operator&=()

template<class BitsEnum>
_MSTD_CONSTEXPR17 flags & mstd::flags< BitsEnum >::operator&= ( const flags< BitsEnum > other)
inlinenoexcept

◆ operator=() [1/2]

template<class BitsEnum>
_MSTD_CONSTEXPR17 flags & mstd::flags< BitsEnum >::operator= ( const flags< BitsEnum > & other)
defaultnoexcept

◆ operator=() [2/2]

template<class BitsEnum>
_MSTD_CONSTEXPR17 flags & mstd::flags< BitsEnum >::operator= ( flags< BitsEnum > && other)
defaultnoexcept

◆ operator==()

template<class BitsEnum>
_MSTD_CONSTEXPR17 bool mstd::flags< BitsEnum >::operator== ( const flags< BitsEnum > other) const
inlinenodiscardnoexcept

◆ operator^()

template<class BitsEnum>
_MSTD_CONSTEXPR17 flags mstd::flags< BitsEnum >::operator^ ( const flags< BitsEnum > other) const
inlinenodiscardnoexcept

◆ operator^=()

template<class BitsEnum>
_MSTD_CONSTEXPR17 flags & mstd::flags< BitsEnum >::operator^= ( const flags< BitsEnum > other)
inlinenoexcept

◆ operator|()

template<class BitsEnum>
_MSTD_CONSTEXPR17 flags mstd::flags< BitsEnum >::operator| ( const flags< BitsEnum > other) const
inlinenodiscardnoexcept

◆ operator|=()

template<class BitsEnum>
_MSTD_CONSTEXPR17 flags & mstd::flags< BitsEnum >::operator|= ( const flags< BitsEnum > other)
inlinenoexcept

◆ operator~()

template<class BitsEnum>
_MSTD_CONSTEXPR17 flags mstd::flags< BitsEnum >::operator~ ( ) const
inlinenodiscardnoexcept

◆ value()

template<class BitsEnum>
_MSTD_CONSTEXPR17 value_type mstd::flags< BitsEnum >::value ( ) const
inlinenodiscardnoexcept

Member Data Documentation

◆ _flags

template<class BitsEnum>
value_type mstd::flags< BitsEnum >::_flags = 0
private