Didn't ANSI C99 add a complex type, _Complex_I? Not sure if it supports overloading.
On Sun, Jan 28, 2018 at 1:01 PM, John D Lamb <[email protected]> wrote: > On 27/01/18 19:38, Vincent Vandalon wrote: > >> Dear All, >> >> I am curious why the standard binary operators are not overloaded for the >> gsl_complex type in C++; I presume this overloading is omitted >> intentionally (since you can quickly write them yourself). Was the choice >> to omit overloaded operators mainly driven by the desire to avoid >> accidentally/non-explicit casting of a built-in type to gsl_complex? >> > Presumably because gsl is written in C. > > I don’t think C has a complex type. In any case the C++ complex type seems > to be difficult to make compatible with the gsl representation while > maintaining the original code in C. > > I realise it is possible to do some sort of conversion/casting in C++. But > this is not likely efficient. > > -- > John D Lamb > > -- gideon
