diff --git a/include/argparse/argparse.hpp b/include/argparse/argparse.hpp index 29abf78..376f34f 100644 --- a/include/argparse/argparse.hpp +++ b/include/argparse/argparse.hpp @@ -92,7 +92,9 @@ static constexpr bool is_representable_v = constexpr size_t repr_max_container_size = 5; template std::string repr(T const &val) { - if constexpr (std::is_convertible_v) { + if constexpr (std::is_same_v) { + return val ? "true" : "false"; + } else if constexpr (std::is_convertible_v) { return '"' + std::string{std::string_view{val}} + '"'; } else if constexpr (is_container_v) { std::stringstream out;