diff options
| author | Markus Mittendrein <maxmitti@maxmitti.tk> | 2022-01-07 12:36:23 +0100 |
|---|---|---|
| committer | Markus Mittendrein <maxmitti@maxmitti.tk> | 2022-01-07 12:36:23 +0100 |
| commit | 4f2eb7c1dfe467aa2d7a6652a111edc74aa7b0a1 (patch) | |
| tree | d9729268419bad126f88d70c3f27168c32abef7e /include | |
| parent | 1c437aec2fb7203915a647f7e2ceb68f5c58029d (diff) | |
| download | cxxformat-4f2eb7c1dfe467aa2d7a6652a111edc74aa7b0a1.tar.gz cxxformat-4f2eb7c1dfe467aa2d7a6652a111edc74aa7b0a1.zip | |
Refine static_assert messages
Diffstat (limited to 'include')
| -rw-r--r-- | include/cxxformat/formatters.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<std::size_t> minWidth, optional_int<std::size_t> 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"); |
