#include <xtd/xtd>
using namespace std;
class character {
public:
character(
const ustring& name,
const ustring& rank) noexcept : name_(name), rank_(rank) {}
const ustring& name() const noexcept {
return name_;}
const ustring& rank() const noexcept {
return rank_;}
private:
};
int main() {
any value = make_any<int>(42);
value = make_any<ustring>("Star Trek: The Next Generation");
value =
character(
"Jean-Luc Picard",
"Captain");
register_any_stringer<character>([](character value) {return value.to_string();});
}
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
@ any
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
@ character
Specifies that the text is trimmed to the nearest character.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17