safe_numerics
safe_numerics copied to clipboard
Problems building with not that old gcc versions since Boost 1.73
Since https://github.com/boostorg/safe_numerics/commit/937928693d40564a72fd48f63039040908098132, building
#include <boost/safe_numerics/safe_integer.hpp>
#include <fmt/format.h>
#include <fmt/ostream.h>
template<typename Stored,
Stored Min,
Stored Max,
typename P,
typename E>
struct fmt::formatter<
boost::safe_numerics::safe_base<
Stored, Min, Max, P, E
>
> : fmt::ostream_formatter
{
};
void la()
{
fmt::print("{}", boost::safe_numerics::safe<int>{ 4 });
}
with gcc 8.2-10.4 with -std=gnu++17 -Os -Wall fails. https://godbolt.org/z/Goc3er7vc
It's clearly a gcc bug, so it would be fair game to ignore it. But it affects Ubuntu 20.04.