From 5572cb0862d1b89aff1f938b88f0f8cec358c472 Mon Sep 17 00:00:00 2001 From: Mike Zozu Date: Tue, 15 Dec 2020 16:58:38 +0300 Subject: [PATCH] trying to fix strange AppleClang compiler error --- include/argparse/argparse.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ""; }