Fix warnings

This commit is contained in:
Victor Zverovich committed 2019-08-10 16:56:57 -07:00
1 parent 1607a01870
commit 4e99e09bb3
3 files changed
+6 -4

No files matched your search

+2 -1
View File
@@ -123,7 +123,8 @@ template <> struct std::formatter<S> {
auto format(S s, format_context& ctx) {
int width = visit_format_arg(
[](auto value) -> int {
if constexpr (!is_integral_v<decltype(value)>)
using type = decltype(value);
if constexpr (!is_integral_v<type> || is_same_v<type, bool>)
throw format_error("width is not integral");
// else if (value < 0 || value > numeric_limits<int>::max())
else if (fmt::internal::is_negative(value) ||