Skip to content

Commit 76dfe88

Browse files
committed
Fix to_string(std::any) overload
1 parent fc80e7f commit 76dfe88

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/cpp2util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ inline auto to_string(...) -> std::string {
11141114
return "(customize me - no cpp2::to_string overload exists for this type)";
11151115
}
11161116

1117-
inline auto to_string(std::any const&) -> std::string {
1117+
inline auto to_string(std::same_as<std::any> auto const&) -> std::string {
11181118
return "std::any";
11191119
}
11201120

regression-tests/test-results/clang-12/mixed-string-interpolation.cpp.execution

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ p = (first, (empty))
1414
t = (3.140000, (empty), (empty))
1515
vv = 0
1616
vv = (1, 2.300000)
17-
custom = std::any
17+
custom = (customize me - no cpp2::to_string overload exists for this type)

0 commit comments

Comments
 (0)