mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
trying to fix strange AppleClang compiler error
This commit is contained in:
parent
6964cccd2f
commit
5572cb0862
@ -94,10 +94,6 @@ constexpr size_t repr_max_container_size = 5;
|
||||
template <typename T> std::string repr(T const &val) {
|
||||
if constexpr (std::is_convertible_v<T, std::string_view>) {
|
||||
return '"' + std::string{std::string_view{val}} + '"';
|
||||
} else if constexpr (is_streamable_v<T>) {
|
||||
std::stringstream out;
|
||||
out << val;
|
||||
return out.str();
|
||||
} else if constexpr (is_container_v<T>) {
|
||||
std::stringstream out;
|
||||
out << "{";
|
||||
@ -117,6 +113,10 @@ template <typename T> std::string repr(T const &val) {
|
||||
out << repr(*std::prev(val.end()));
|
||||
out << "}";
|
||||
return out.str();
|
||||
} else if constexpr (is_streamable_v<T>) {
|
||||
std::stringstream out;
|
||||
out << val;
|
||||
return out.str();
|
||||
} else {
|
||||
return "<not representable>";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user