octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #34201] Build fail with -std=c++0x flag


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #34201] Build fail with -std=c++0x flag
Date: Tue, 06 Sep 2011 19:26:35 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 Iceweasel/5.0

Update of bug #34201 (project octave):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #3:

I'm not sure, but I think the problem is that we have both


  template<typename _Tp>
    inline complex<_Tp>
    conj(const complex<_Tp>& __z)
    { return complex<_Tp>(__z.real(), -__z.imag()); }


and


  template<typename _Tp>
    inline typename __gnu_cxx::__promote<_Tp>::__type
    conj(_Tp __x)
    { return __x; }


We don't want to remove our template functions that match
"R fun (T)" and "R fun (const T&)" since those are separate and we want to
handle both cases.

If adding a <TYPE> tag to the locations where std::conj is used avoids the
problem, then I think that is OK.  My tests showed that doing that works and
g++ is calling the correct version of the function then.  It's not clear to me
why that is required for the compiler to resolve the function call, but adding
it doesn't hurt as far as I can tell.

I checked in the following changeset, attributed to Júlio:

http://hg.savannah.gnu.org/hgweb/octave/rev/353c71c76f22

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34201>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]