[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ complex class use in str2double.cc
From: |
Jaroslav Hajek |
Subject: |
Re: C++ complex class use in str2double.cc |
Date: |
Mon, 1 Mar 2010 16:04:27 +0100 |
On Mon, Mar 1, 2010 at 3:44 PM, Michael Goffioul
<address@hidden> wrote:
> On Mon, Mar 1, 2010 at 2:26 PM, Jaroslav Hajek <address@hidden> wrote:
>> This must be something relatively new, I suppose. I have an older
>> draft and it is not there.
>> Anyway I'm glad this defect will be fixed. I made the following change:
>> http://hg.savannah.gnu.org/hgweb/octave/rev/f578e6468d0c
>
> From
> http://gcc.gnu.org/viewcvs?view=revision&revision=135878
> It has been around for a little more than 1.5yr in libstdc++.
> And it was in MSVC 2008 when it was released.
>
> Your changeset should be ok under MSVC, except that the
> macro to test for is usually _MSC_VER. I'm don't think MSVC
> #define's __MSVC__. Wouldn't it be better to have a configure
> check to test that functionality?
>
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.
regards
--
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz