Archives
D Programming
DD.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++ - maybe a bug report
I believe there may be a problem here. using namespace std; class CBox { public: CBox(double lv = 1.0, double bv = 1.0, double hv = 1.0) : m_Height(hv), m_Length(lv), m_Breadth(bv) { } private: double m_Length; double m_Breadth; double m_Height; }; int main() { CBox aBox = 2; //OK CBox bBox = aBox; //OK CBox cBox = 2 < 3 ? aBox : 3; // ERROR } C:\dm\bin\sc -Ae -C -WA -S -5 -a8 test2.cpp -I\dm\stlport\stlport CBox cBox = 2 < 3 ? aBox : 3; //Burp ^ test2.cpp(21) : Error: illegal operand types Had: CBox and: int --- errorlevel 1 Apr 05 2003
Jim Jennings wrote:I believe there may be a problem here. Apr 05 2003
"roland" <--rv ronetech.com> wrote in message news:3E8EF4C8.3050203 ronetech.com...Jim Jennings wrote:I believe there may be a problem here. Apr 05 2003
Certainly is. The 2 < 3 should be parsed correctly, and the 2nd 3 should be implicitly converted to a CBox. CodeWarrior compiles this without issue. "Jim Jennings" <jwjenn mindspring.com> wrote in message news:b6mq4c$12as$1 digitaldaemon.com...I believe there may be a problem here. using namespace std; class CBox { public: CBox(double lv = 1.0, double bv = 1.0, double hv = 1.0) : m_Height(hv), m_Length(lv), m_Breadth(bv) { } private: double m_Length; double m_Breadth; double m_Height; }; int main() { CBox aBox = 2; //OK CBox bBox = aBox; //OK CBox cBox = 2 < 3 ? aBox : 3; // ERROR } C:\dm\bin\sc -Ae -C -WA -S -5 -a8 test2.cpp -I\dm\stlport\stlport CBox cBox = 2 < 3 ? aBox : 3; //Burp ^ test2.cpp(21) : Error: illegal operand types Had: CBox and: int --- errorlevel 1 Apr 05 2003
"Matthew Wilson" <dmd synesis.com.au> wrote in message news:b6nl2n$1m3e$1 digitaldaemon.com...Certainly is. The 2 < 3 should be parsed correctly, and the 2nd 3 should Apr 05 2003
Pleasure "Jim Jennings" <jwjenn mindspring.com> wrote in message news:b6nusl$1t62$1 digitaldaemon.com..."Matthew Wilson" <dmd synesis.com.au> wrote in message news:b6nl2n$1m3e$1 digitaldaemon.com...Certainly is. The 2 < 3 should be parsed correctly, and the 2nd 3 should Apr 05 2003
In article <b6nl2n$1m3e$1 digitaldaemon.com>, Matthew Wilson says...Certainly is. The 2 < 3 should be parsed correctly, and the 2nd 3 should be implicitly converted to a CBox. CodeWarrior compiles this without issue. Apr 10 2003
|