Shows how to use format xtd::parse<bool> method with boolean values.
#include <xtd/console>
#include <xtd/parse>
auto main() -> int {
console::write_line(b1);
console::write_line(b2);
console::write_line(b3);
console::write_line(b4);
console::write_line(b5);
console::write_line(b6);
console::write_line(b7);
console::write_line(b8);
try {
console::write_line(b9);
console::write_line("Exception : {}", e.message());
}
}
The exception that is thrown when a method call is invalid for the object's current state.
Definition system_exception.hpp:18
bool parse< bool >(const std::string &str)
Convert a string into a type.
Definition parse.hpp:371
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10