
typedef std::complex<double> complex_t; accumulator_set<complex_t,stats<tag::mean,tag::moment<2> > > results in what may be the longest error messages ever. Should this work?

Neal Becker wrote:
typedef std::complex<double> complex_t; accumulator_set<complex_t,stats<tag::mean,tag::moment<2> > >
results in what may be the longest error messages ever. Should this work?
A little more info: This is gcc-4.1.2: In instantiation of 'boost::numeric::functional::result_of_divides<std::complex<double>, long unsigned int, void>::nested': [... lots of instantiated from ...] /usr/local/src/boost.hg/boost/accumulators/numeric/functional.hpp:183: error: no match for 'operator/' in 'boost::numeric::functional::detail::lvalue_of [with T = std::complex<double>]() / boost::numeric::functional::detail::lvalue_of [with T = long unsigned int]()'

Neal Becker wrote:
Neal Becker wrote:
typedef std::complex<double> complex_t; accumulator_set<complex_t,stats<tag::mean,tag::moment<2> > >
results in what may be the longest error messages ever. Should this work?
You should either #include boost/accumulators/numeric/functional/complex.hpp before any other accumulators headers, or else compile with BOOST_NUMERIC_FUNCTIONAL_STD_COMPLEX_SUPPORT defined. -- Eric Niebler Boost Consulting www.boost-consulting.com
participants (2)
-
Eric Niebler
-
Neal Becker