Subject: [Boost-bugs] [Boost C++ Libraries] #3514: enable support for complex @ int
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-07 18:42:46
#3514: enable support for complex @ int
------------------------------+---------------------------------------------
Reporter: guwi17 | Owner: guwi17
Type: Feature Requests | Status: new
Milestone: Boost 1.42.0 | Component: uBLAS
Version: Boost 1.40.0 | Severity: Optimization
Keywords: |
------------------------------+---------------------------------------------
enable basic operators for mixed types:
* c+i; i+c; i-c; c-i; i*c; c*i; i/c; c/i;
The implementation should be roughly like
{{{
template<R> std::complex<R> operator+ (int in1, const std::complex<R>& in2
){
  return typename std::complex<R>::value_type(in1) + in2;
}
}}}
plus a carefully chosen enable_if to avoid "ambigous overload" errors when
R is int
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3514> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC