Ignore -Wformat-truncation

This commit is contained in:
Krystian Stasiowski
2020-02-28 15:33:36 -05:00
parent 12309e65e5
commit 9d6b097c54

View File

@ -474,6 +474,14 @@ count_digits(std::size_t value)
return value < 10 ? 1 : count_digits(value / 10) + 1;
}
// Ignore -Wformat-truncation, we know what
// we are doing here. The version check does
// not need to be extremely precise.
#if defined(__GNUC__) && __GNUC__ > 4
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-truncation"
#endif
template<std::size_t N>
inline
static_string<N>
@ -608,6 +616,10 @@ to_static_wstring_float_impl(long double value) noexcept
return static_wstring<N>(buffer);
}
#if defined(__GNUC__) && __GNUC__ > 4
#pragma GCC diagnostic pop
#endif
template<typename Traits, typename CharT, typename ForwardIterator>
BOOST_STATIC_STRING_CPP14_CONSTEXPR
inline