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++ - Const error should be warning ??
Not sure whether this should only be a warning (haven't mustered the effort to trawl the standard this early in the morning) class X { public: operator const char const * () const { return 0; } }; gives Error: ...: illegal combination of types I expected it to simply tell me that the first (or second) const was superfluous. I don't object to this one in its current form, but am concerned as to whether it means that the compiler would balk in a template class defintion where that template defines a member typedef an a constant type with which it is parameterised, and the parameterising type is itself const. Borland does have problems in this area. Matthew Sep 22 2002
"Matthew Wilson" <dmd synesis.com.au> wrote in message news:amlfgi$p8$1 digitaldaemon.com...Not sure whether this should only be a warning (haven't mustered the Sep 23 2002
I believe the standard says it's supposed to be an error, just like short short is an error, and short int short is an error. Sep 23 2002
|