Opened 8 years ago

Closed 7 years ago

#3514 closed Feature Requests (fixed)

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

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by anonymous

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

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

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain guwi17.
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.