Core/Flags: Make Flags default-constructible
This commit is contained in:
parent
311e2a545d
commit
1d6f22cd8a
|
|
@ -29,7 +29,7 @@ namespace Nz
|
||||||
public:
|
public:
|
||||||
using BitField = typename std::conditional<(EnumAsFlags<E>::max > 32), UInt64, UInt32>::type;
|
using BitField = typename std::conditional<(EnumAsFlags<E>::max > 32), UInt64, UInt32>::type;
|
||||||
|
|
||||||
constexpr Flags(BitField value);
|
constexpr Flags(BitField value = 0);
|
||||||
constexpr Flags(E enumVal);
|
constexpr Flags(E enumVal);
|
||||||
|
|
||||||
explicit constexpr operator bool() const;
|
explicit constexpr operator bool() const;
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,13 @@ namespace Nz
|
||||||
* \brief Core class used to combine enumeration values into flags bitfield
|
* \brief Core class used to combine enumeration values into flags bitfield
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Constructs a Flags object using a bitfield
|
* \brief Constructs a Flags object using a bitfield
|
||||||
*
|
*
|
||||||
* \param value Bitfield to be used
|
* \param value Bitfield to be used
|
||||||
*
|
*
|
||||||
* Uses a bitfield to builds the flag value. (e.g. if bit 0 is active, then Enum value 0 will be set as active).
|
* Uses a bitfield to builds the flag value. (e.g. if bit 0 is active, then Enum value 0 will be set as active).
|
||||||
*/
|
*/
|
||||||
template<typename E>
|
template<typename E>
|
||||||
constexpr Flags<E>::Flags(BitField value) :
|
constexpr Flags<E>::Flags(BitField value) :
|
||||||
m_value(value)
|
m_value(value)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue