Opened 10 years ago

#8275 new Bugs

conversion_traits::super/subtype incorrect for UDT's

Reported by: John Maddock Owned by: Douglas Gregor
Milestone: To Be Determined Component: numeric
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

The following static assertion fails:

#include <boost/numeric/conversion/conversion_traits.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>

   using namespace boost::multiprecision;
   BOOST_STATIC_ASSERT(boost::numeric::convdetail::get_is_subranged<cpp_dec_float_50, cpp_dec_float_100>::type::value);

Which causes all sorts of other failures in clients of this class - it looks like UDT conversions are treated as always non-narrowing (?) where as use of numeric_limits would quickly reveal otherwise.

Change History (0)

Note: See TracTickets for help on using tickets.