#include <xtd/as>
#include <xtd/console>
#include <xtd/enum_class>
 
 
constexpr int NORMAL = 0b0;
constexpr int BOLD = 0b1;
constexpr int ITALIC = 0b10;
constexpr int UNDERLINE = 0b100;
constexpr int STRIKEOUT = 0b1000;
 
  normal = NORMAL,
  bold = BOLD,
  italic = ITALIC,
  underline = UNDERLINE,
  strikeout = STRIKEOUT
);
 
 
auto main() -> int {
  console::write_line("name = {}", text_attribute::bold | text_attribute::italic);
  console::write_line(
"value = {}", 
enum_object(text_attribute::bold | text_attribute::italic).to_int32());
 
  console::write_line("as<int> = {}", as<int>(text_attribute::bold | text_attribute::italic));
}
 
Provides the base class for enumerations.
Definition enum_object.hpp:42
 
#define enum_class_(namespace_name, enum_class_t,...)
Provides the registration struct for enum class.
Definition enum_class.hpp:52
 
#define flags_attribute_(namespace_name, enum_type)
Provides the set attribute struct for enumerations helper.
Definition flags_attribute.hpp:34
 
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10