From a2ca76210db5563eb6093fd5be61f688db9ac2cd Mon Sep 17 00:00:00 2001 From: Ben Deane Date: Fri, 11 Jul 2025 07:51:28 -0600 Subject: [PATCH] :children_crossing: Improve help message for `format_result` conversion Problem: - When converting a `format_result` to a `ct_string`, if it has runtime format arguments, the message does not make the contents of the `format_result` clear. Solution: - Use a better assertion. Note: - We cannot use a formatted `STATIC_ASSERT` here of course, because `ct_format` provides the mechanism for `STATIC_ASSERT`. --- include/stdx/ct_format.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/stdx/ct_format.hpp b/include/stdx/ct_format.hpp index 7eb2da9..f67ab7c 100644 --- a/include/stdx/ct_format.hpp +++ b/include/stdx/ct_format.hpp @@ -41,7 +41,7 @@ template struct format_result { } friend constexpr auto operator+(format_result const &) { - static_assert(decltype(ct_string_convertible())::value, + static_assert(always_false_v, "Unary operator+ can only be used on a format_result " "without any runtime arguments"); }