Please see the scenario below...am I doing something wrong or is this a gcc or multiprecision bug?
Thanks,
Rob Conde
given the following code (multiPrecisionTest.cpp):
#include
#include
typedef boost::multiprecision::int128_t int128_t;
typedef boost::multiprecision::cpp_bin_float_quad float128_t;
int main()
{
int128_t intVal;
float128_t floatVal(intVal.convert_to());
return 0;
}
--------------------------------------------------------------------------
g++ -std=c++0x -c multiPrecisionTest.cpp
I get the following error:
In file included from ./boost/multiprecision/cpp_int.hpp:1936:0,
from multiPrecisionTest.cpp:1:
./boost/multiprecision/cpp_int/misc.hpp: In instantiation of ‘typename boost::enable_if_c<(boost::multiprecision::backends::is_trivial_cpp_int >::value && boost::multiprecision::is_signed_number >::value)>::type boost::multiprecision::backends::eval_convert_to(R*, const boost::multiprecision::backends::cpp_int_backend&) [with R = boost::multiprecision::number, (boost::multiprecision::expression_template_option)0u>; unsigned int MinBits1 = 128u; unsigned int MaxBits1 = 128u; boost::multiprecision::cpp_integer_type SignType1 = (boost::multiprecision::cpp_integer_type)1u; boost::multiprecision::cpp_int_check_type Checked1 = (boost::multiprecision::cpp_int_check_type)0u; Allocator1 = void; typename boost::enable_if_c<(boost::multiprecision::backends::is_trivial_cpp_int >::value && boost::multiprecision::is_signed_number >::value)>::type = void]’:
./boost/multiprecision/number.hpp:585:40: required from ‘void boost::multiprecision::number::convert_to_imp(T*) const [with T = boost::multiprecision::number, (boost::multiprecision::expression_template_option)0u>; Backend = boost::multiprecision::backends::cpp_int_backend<128u, 128u, (boost::multiprecision::cpp_integer_type)1u, (boost::multiprecision::cpp_int_check_type)0u, void>; boost::multiprecision::expression_template_option ExpressionTemplates = (boost::multiprecision::expression_template_option)0u]’
./boost/multiprecision/number.hpp:601:29: required from ‘T boost::multiprecision::number::convert_to() const [with T = boost::multiprecision::number, (boost::multiprecision::expression_template_option)0u>; Backend = boost::multiprecision::backends::cpp_int_backend<128u, 128u, (boost::multiprecision::cpp_integer_type)1u, (boost::multiprecision::cpp_int_check_type)0u, void>; boost::multiprecision::expression_template_option ExpressionTemplates = (boost::multiprecision::expression_template_option)0u]’
multiPrecisionTest.cpp:10:54: required from here
./boost/multiprecision/cpp_int/misc.hpp:533:138: error: no type named ‘type’ in ‘struct boost::common_type, (boost::multiprecision::expression_template_option)0u>, __int128 unsigned>’
typedef typename common_type::local_limb_type>::type common_type;
^