I found problem with /usr/include/c++/3.3/bits/cmath.tcc.
This line of code:
_Tp __y = __n % 2 ? __x : 1;
isn't correct for some values of template parameter _Tp.
For example, my g++ says somehing like this:
polynomial.hpp:37: instantiated from `T
polynomial<T>::calculate(const T&) const [with T =
std::complex<MpfrClass>]'
laguerre.cpp:43: instantiated from here
/usr/include/c++/3.3/bits/cmath.tcc:41: error: no match for ternary
'operator?:' in '((__n % 2) != 0) ? __x : 1'
I think it's better to write
_Tp __y;
if (__n % 2) __y = __x;
else __y = 1;
Thanks.