#include <xtd/console>
#include <xtd/enum_class>
#include <xtd/environment>
#include <xtd/format>
enum class week_day {
};
explicit operator auto()
const noexcept {
return xtd::enum_collection<week_day> {{week_day::monday,
"monday"}, {week_day::tuesday,
"tuesday"}, {week_day::wednesday,
"wednesday"}, {week_day::thursday,
"thursday"}, {week_day::friday,
"friday"}, {week_day::saturday,
"saturday"}, {week_day::sunday,
"sunday"}};}
};
auto print_week_day(
const string&
text, week_day value, cap
c) {
else
}
auto main() -> int {
print_week_day("week_day::monday", week_day::monday, cap::title);
print_week_day("week_day::thursday", week_day::thursday, cap::middle);
print_week_day("week_day::sunday", week_day::sunday, cap::end);
}
static std::ostream out
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output str...
Definition console.hpp:52
static xtd::string new_line() noexcept
Gets the newline string defined for this environment.
std::vector< std::pair< enum_t, xtd::string > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition enum_collection.hpp:24
@ c
The C key.
Definition console_key.hpp:92
@ tuesday
Indicates tuesday.
Definition day_of_week.hpp:31
@ saturday
Indicates saturday.
Definition day_of_week.hpp:39
@ sunday
Indicates sunday.
Definition day_of_week.hpp:27
@ monday
Indicates monday.
Definition day_of_week.hpp:29
@ wednesday
Indicates wednesday.
Definition day_of_week.hpp:33
@ thursday
Indicates thursday.
Definition day_of_week.hpp:35
@ friday
Indicates friday.
Definition day_of_week.hpp:37
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:16
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
const_iterator end() const
Returns an iterator to the end.
Definition read_only_span.hpp:213
Provides the registration struct for enumerations.
Definition enum_register.hpp:38