It looks like boost/multiprecision/detail/number_base.hpp header in one
of the later trunk versions
has ambiguous partial specialization problem which Oracle Studio 12.4
C++ compiler detects.
It can be also detected by gcc-4.8.2 as small 35 lines independent test
case below made from this header shows.
gcc -c -std=c++11 t.cc # gcc-4.8.2 compilation
t.cc:17:62: error: ambiguous class template instantiation for 'struct
canonical_imp,
(expression_template_option)1u>, cpp_dec_float<50u>, int_<3> >'
CC -c -std=c++11 t.cc # Oracle Studio 12.4 C++ compilation
"t.cc", line 17: Error: Ambiguous partial specialization for
canonical_imp,
1>, cpp_dec_float<50, int, void>, int_<3>>, canonical_imp> and canonical_imp, Backend, Tag>.
t.cc
==================================
template< bool B> struct enable_if_c{
typedef bool type;
};
template< int N > struct int_{};
enum expression_template_option {et_on=1};
template
class number;
template struct canonical_imp {
typedef int type;
};
template struct
canonical_imp,Backend,Tag> {
typedef B type;
};
template struct
canonical_imp>{
typedef Val type;
};
template struct canonical {
typedef typename canonical_imp>::type type;
};
template struct is_restricted_conversion {
typedef bool type;
};
template
class number {
public:
number() {}
template <class V> number(const V& v,typename
enable_if_c::type,Backend>::value>::type * =0){}
};
template class cpp_dec_float;
template class
cpp_dec_float {
public: cpp_dec_float() {}
};
template <class RealType> void instantiate(RealType) {}
typedef number, et_on> test_type;
void foo() {
instantiate(test_type());
}
===============================
Any suggestions how to fix this?
Thanks,
Sergey