Boost logo

Ublas :

Subject: Re: [ublas] enable complex @ int
From: Neal Becker (ndbecker2_at_[hidden])
Date: 2009-09-29 11:06:17


There is one problem with that more generic version, if you use
std::complex<int> you will get a conflict:

/usr/local/src/boost.hg/boost/numeric/ublas/traits.hpp:96: error: ambiguous
overload for 'operator+' in 'std::complex<int>(((const int&)((const int*)
(&0))), ((const int&)((const int*)(&0)))) + 0'
/usr/local/src/boost.hg/boost/numeric/ublas/traits.hpp:48: note: candidates
are: std::complex<_Tp> boost::numeric::ublas::operator+(const
std::complex<_Tp>&, int) [with R = int]
/usr/lib/gcc/x86_64-redhat-
linux/4.4.1/../../../../include/c++/4.4.1/complex:328: note:
std::complex<_Tp> std::operator+(const std::complex<_Tp>&, const _Tp&) [with
_Tp = int]