diff --git a/include/argparse/argparse.hpp b/include/argparse/argparse.hpp index 3cb790e..29abf78 100644 --- a/include/argparse/argparse.hpp +++ b/include/argparse/argparse.hpp @@ -94,10 +94,6 @@ constexpr size_t repr_max_container_size = 5; template std::string repr(T const &val) { if constexpr (std::is_convertible_v) { return '"' + std::string{std::string_view{val}} + '"'; - } else if constexpr (is_streamable_v) { - std::stringstream out; - out << val; - return out.str(); } else if constexpr (is_container_v) { std::stringstream out; out << "{"; @@ -117,6 +113,10 @@ template std::string repr(T const &val) { out << repr(*std::prev(val.end())); out << "}"; return out.str(); + } else if constexpr (is_streamable_v) { + std::stringstream out; + out << val; + return out.str(); } else { return ""; }