Hi folks,
I am trying to use eval_pow() and eval_powm()
My code is like this and I am using Visual Studio 12:
#include
...
boost::multiprecision::cpp_int pow("1234567");
boost::multiprecision::cpp_int base(3);
boost::multiprecision::cpp_int result = 0;
boost::multiprecision::default_ops::eval_pow(result, base, pow);
I cannot figure out what's going on wrong when I compile it, the error
message is like the following, Can anyone shed some light please?
D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(146):
error C2039: 'unsigned_types' : is not a member of
'boost::multiprecision::numberboost::multiprecision::limb_type>,et_on>'
1>
D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(191)
: see reference to class template instantiation
'boost::multiprecision::detail::canonical_imp>'
being compiled
1> with
1> [
1> Val=unsigned char
1> , Backend=double_type
1> ]
1>
D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/integer_ops.hpp(309)
: see reference to class template instantiation
'boost::multiprecision::detail::canonical' being
compiled
1> KeyGen.cpp(152) : see reference to function template
instantiation 'void
boost::multiprecision::default_ops::eval_powmboost::multiprecision::cpp_int,int(Backend
&,const Backend &,const Backend &,Integer)' being compiled
1> with
1> [
1> Backend=boost::multiprecision::cpp_int
1> , Integer=int
1> ]
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(146):
error C2146: syntax error : missing ',' before identifier 'unsigned_types'
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(146):
error C2065: 'unsigned_types' : undeclared identifier
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(148):
error C2977: 'boost::mpl::find_if' : too many template arguments
1> D:\Develop\C++\boost_1_55_1\boost/mpl/find_if.hpp(33) : see
declaration of 'boost::mpl::find_if'
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(148):
error C2955: 'boost::mpl::find_if' : use of class template requires
template argument list
1> D:\Develop\C++\boost_1_55_1\boost/mpl/find_if.hpp(33) : see
declaration of 'boost::mpl::find_if'
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(136):
error C2039: 'signed_types' : is not a member of
'boost::multiprecision::numberboost::multiprecision::limb_type>,et_on>'
1>
D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(191)
: see reference to class template instantiation
'boost::multiprecision::detail::canonical_imp>'
being compiled
1> with
1> [
1> Val=int
1> , Backend=double_type
1> ]
1>
D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/integer_ops.hpp(310)
: see reference to class template instantiation
'boost::multiprecision::detail::canonical' being
compiled
1> with
1> [
1> Integer=int
1> ]
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(136):
error C2146: syntax error : missing ',' before identifier 'signed_types'
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(136):
error C2065: 'signed_types' : undeclared identifier
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(138):
error C2977: 'boost::mpl::find_if' : too many template arguments
1> D:\Develop\C++\boost_1_55_1\boost/mpl/find_if.hpp(33) : see
declaration of 'boost::mpl::find_if'
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/number_base.hpp(138):
error C2955: 'boost::mpl::find_if' : use of class template requires
template argument list
1> D:\Develop\C++\boost_1_55_1\boost/mpl/find_if.hpp(33) : see
declaration of 'boost::mpl::find_if'
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/integer_ops.hpp(336):
error C2780:
'enable_if>,void>::type
boost::multiprecision::backends::eval_right_shift(boost::multiprecision::backends::cpp_int_backend
&,T)' : expects 2 arguments - 1 provided
1>
D:\Develop\C++\boost_1_55_1\boost/multiprecision/cpp_int/bitwise.hpp(355) :
see declaration of 'boost::multiprecision::backends::eval_right_shift'
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/integer_ops.hpp(336):
error C2780:
'enable_if_c>::value,void>::type
boost::multiprecision::backends::eval_right_shift(boost::multiprecision::backends::cpp_int_backend
&,boost::multiprecision::double_limb_type)' : expects 2 arguments - 1
provided
1>
D:\Develop\C++\boost_1_55_1\boost/multiprecision/cpp_int/bitwise.hpp(298) :
see declaration of 'boost::multiprecision::backends::eval_right_shift'
1>D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/integer_ops.hpp(336):
error C2780: 'void boost::multiprecision::default_ops::eval_right_shift(T
&,const T &,const V)' : expects 3 arguments - 1 provided
1>
D:\Develop\C++\boost_1_55_1\boost/multiprecision/detail/default_ops.hpp(758)
: see declaration of 'boost::multiprecision::default_ops::eval_right_shift'
------------------------------
Thanks,
-Anderson Lebowski