www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - stlport <complex> bug?

Hi,

I've just been trying some basic op (compound assignment with
arithmetic) with the complex type using stlport with dmc, but it
wouldn't compile when it should... :(

////////////////////////////////////////////////////////////////
#include <iostream>
#include <complex>
int main()
{
    std::complex<double> cval( 4.0, 1.0 );
    std::cout << cval << std::endl;
    cval += 1.0;
    std::cout << cval << std::endl;
}
////////////////////////////////////////////////////////////////

C:\>dmc -I\dm\stlport\stlport\ complexTest.cpp
\dm\stlport\stlport\stl/_complex.h(359) : Warning 11: non-const
reference initialized to temporary
\dm\stlport\stlport\stl/_complex.h(359) : Error: no implicit
conversion with explicit constructor
--- errorlevel 1

////////////////////////////////////////////////////////////////

Any help?

Thax,
KTC
-- 
Experience is a good school but the fees are high.
    - Heinrich Heine
Jan 04 2004