xtd
0.2.0
Loading...
Searching...
No Matches
◆
operator auto()
template<typename enum_t >
xtd::enum_set_attribute
< enum_t >::operator auto
(
)
const
inline
explicit
noexcept
Allows to set attribute to an enumeration that can be used by
xtd::enum_object
.
Returns
One of
xtd::enum_attribute
values.
Remarks
To set attribute to an enumeration just override
xtd::enum_set_attribute
.
Examples
The following code show how to set attribute to the value_flags enum class.
enum class
value_flags {
value_none = 0,
value_one = 0b1,
value_two = 0b10,
value_three = 0b100,
};
template
<>
xtd::enum_set_attribute<value_flags>
{
explicit
operator
auto
()
const
noexcept
{
return
xtd::enum_attribute::flags
;}
};
xtd::enum_attribute::flags
@ flags
Enum flags attribute.
xtd::enum_set_attribute
Provides the set attribute struct for enumerations.
Definition
enum_set_attribute.h:31
xtd
enum_set_attribute
Generated on Sat Sep 14 2024 21:25:17 for xtd by
Gammasoft
. All rights reserved.