Core/Flags: Make Flags default-constructible

This commit is contained in:
Lynix 2017-01-27 14:49:07 +01:00
parent 311e2a545d
commit 1d6f22cd8a
2 changed files with 6 additions and 6 deletions

View File

@ -29,7 +29,7 @@ namespace Nz
public:
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);
explicit constexpr operator bool() const;

View File

@ -13,13 +13,13 @@ namespace Nz
* \brief Core class used to combine enumeration values into flags bitfield
*/
/*!
* \brief Constructs a Flags object using a bitfield
*
* \param value Bitfield to be used
/*!
* \brief Constructs a Flags object using a bitfield
*
* \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).
*/
*/
template<typename E>
constexpr Flags<E>::Flags(BitField value) :
m_value(value)