From 4f2eb7c1dfe467aa2d7a6652a111edc74aa7b0a1 Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Fri, 7 Jan 2022 12:36:23 +0100 Subject: Refine static_assert messages --- include/cxxformat/formatters.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/cxxformat/formatters.hpp b/include/cxxformat/formatters.hpp index b6e1ac9..a713018 100644 --- a/include/cxxformat/formatters.hpp +++ b/include/cxxformat/formatters.hpp @@ -194,7 +194,7 @@ namespace format { } else if constexpr (conv != 'v') { - static_assert(sizeof(T) == 0, "Unsupported conversion specified"); + static_assert(sizeof(T) == 0, "Unsupported conversion for integral type specified"); } static_assert(spec.addSign == '\0' || conv == 'i' || conv == 'd', "‘+’ and ‘ ’ (sign related) flags are only allowed for %i and %d"); @@ -476,7 +476,7 @@ namespace format { static constexpr void format(const format_output auto& out, const T& t, optional_int minWidth, optional_int precision) { static_assert(spec.conversion == 'v' || spec.conversion == 's', "The operator<<(std::ostream&) fallback only supports conversions ‘s’ and ‘v’"); - static_assert(!spec.precision, "The operator<<(std::ostream&) fallback does not support specifying an precision"); + static_assert(!spec.precision, "The operator<<(std::ostream&) fallback does not support specifying any precision"); static_assert(spec.addSign == '\0', "The operator<<(std::ostream&) fallback does not support the add sign (‘+‘) flag"); static_assert(!spec.alternative, "The operator<<(std::ostream&) fallback does not support the alternative (‘#‘) flag"); static_assert(spec.padding == ' ', "The operator<<(std::ostream&) fallback does not support padding with 0"); -- cgit v1.2.3-54-g00ecf