any_info
September 14, 2025 ยท View on GitHub
Shows how to use xtd::any_object class.
Sources
Build and run
Open "Command Prompt" or "Terminal". Navigate to the folder that contains the project and type the following:
xtdc run
Output
[value = one (char [4]), any = one (xtd::string)]
[value = Tue Jan 5 00:00:00 1971 (xtd::date_time), any = Tue Jan 5 00:00:00 1971 (xtd::date_time)]
[value = 42 (int), any = 42 (xtd::box_integer<int>)]
[value = 0.42 (double), any = 0.42 (xtd::box_floating_point<double>)]
[value = 42 (foo1), any = 42 (foo1)]
[value = 42 (foo2), any = 42 (xtd::box<foo2>)]
[value = wednesday (xtd::day_of_week), any = wednesday (xtd::enum_object<xtd::day_of_week>)]