digitalmars.D - "Programming in D for C++ Programmers" mistake
- Sean Eskapp (5/5) Dec 02 2010 There's a significant issue in the "Programming in D for C++ Programmers...
- Walter Bright (3/9) Dec 02 2010 I believe the page is correct. Can you show me in the C++98 Standard whe...
- Sean Eskapp (2/2) Dec 03 2010 I'm sorry, it must have been some form of nonstandard extension I used! ...
There's a significant issue in the "Programming in D for C++ Programmers" article (http://www.digitalmars.com/d/2.0/cpptod.html) The Struct Comparison section is quite wrong. In C++, most structs/classes automatically generate comparison operators. Also, these comparison operators are member functions of the struct, not external functions.
Dec 02 2010
Sean Eskapp wrote:There's a significant issue in the "Programming in D for C++ Programmers" article (http://www.digitalmars.com/d/2.0/cpptod.html) The Struct Comparison section is quite wrong. In C++, most structs/classes automatically generate comparison operators. Also, these comparison operators are member functions of the struct, not external functions.I believe the page is correct. Can you show me in the C++98 Standard where it says otherwise?
Dec 02 2010
I'm sorry, it must have been some form of nonstandard extension I used! I see now that this fails with gcc.
Dec 03 2010