Core/Flags: Allow explicit operator conversion to any integer type of the same size (or greater size) than the internal size
This commit is contained in:
@@ -52,13 +52,14 @@ namespace Nz
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Converts to a bitfield
|
||||
* \return Enabled flags as a bitfield.
|
||||
* \brief Converts to an integer
|
||||
* \return Enabled flags as a integer
|
||||
*
|
||||
* This will convert to a bitfield value.
|
||||
* This will only works if the integer type is large enough to store all flags states
|
||||
*/
|
||||
template<typename E>
|
||||
constexpr Flags<E>::operator BitField() const
|
||||
template<typename T, typename>
|
||||
constexpr Flags<E>::operator T() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user