Modify

Ticket #3514 (closed Feature Requests: fixed)

Opened 5 years ago

Last modified 4 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:

Description

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

Change History

comment:1 Changed 4 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.

View

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.