[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ complex class use in str2double.cc
From: |
John W. Eaton |
Subject: |
Re: C++ complex class use in str2double.cc |
Date: |
Mon, 1 Mar 2010 13:53:12 -0500 |
On 1-Mar-2010, Jaroslav Hajek wrote:
| Surely would. It might be useful in more places as well. Please do it
| if you wish to.
| It would also be nice if we had a config-independent way to do it,
| something like a pair of templated inlines
| set_real and set_imag in oct-cmplx.h. Unfortunately C++ doesn't allow
| adding a non-virtual method to an already defined class.
Currently we have Complex<T> as a typedef, but couldn't make it a
class derived from std::complex<T> and add the methods we need? Then
the details like this could at least be hidden and we wouldn't have to
use #ifdefs or macros except for inside the Complex class
implementation.
jwe