Shows how to use xtd::comparable concept.
#include <xtd/xtd>
auto get_max(const comparable auto& a, const comparable auto& b) {return a > b ? a : b;}
auto get_min(const comparable auto& a, const comparable auto& b) {return a < b ? a : b;}
auto main() -> int {
println(
"max = {}", get_max(42, 21));
println(
"max = {}", get_max(34.5, 62.8));
println(
"min = {}", get_min(version {1, 2, 4}, version {1, 2, 3}));
println(
"min = {}", get_min(4_s + 122_ms, 12_s + 234_ms));
}
auto println(FILE *file) -> void
Writes the current line terminator to the file output stream using the specified format information.
Definition println.hpp:14