Skip to content

Commit a2ca762

Browse files
committed
🚸 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`.
1 parent e3e8ffb commit a2ca762

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/stdx/ct_format.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ template <typename Str, typename Args> struct format_result {
4141
}
4242

4343
friend constexpr auto operator+(format_result const &) {
44-
static_assert(decltype(ct_string_convertible())::value,
44+
static_assert(always_false_v<format_result>,
4545
"Unary operator+ can only be used on a format_result "
4646
"without any runtime arguments");
4747
}

0 commit comments

Comments
 (0)