Ticket #3514 (closed Feature Requests: fixed)

Opened 8 years ago

Last modified 7 years ago

enable support for complex @ int

Reported by: guwi17 Owned by: guwi17
Milestone: Boost 1.42.0 Component: uBLAS
Version: Boost 1.40.0 Severity: Optimization
Keywords: Cc:


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


Change History

comment:1 Changed 7 years ago by anonymous

  • Status changed from new to closed
  • Resolution set to fixed

it's an old bug but now this is possible with ublas.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.