Advertisement

'void' Preceding constructor

Started by October 23, 2010 05:13 AM
1 comment, last by Friggle 14 years, 1 month ago
When the Ctor of a class is preceded by a 'void' specifier then it isn't called but seems to be compiled just as some new valid function.

Example:

class CTest{    // Invalid Ctor definition, does not cause error    // and won't be called when creating an instance of the class!        void CTest()      {        Trace("Ctor Call!\r\n");     }}


Could that be a candidate for a compiler improvement? I think a C++ compiler will generate an error in this case.

Regards,
Thomas
This was fixed in version 2.19.1, svn revision 630 (or at least should have been).

What version are you using?

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
Sorry for this one, you are right:
I am using 2.19.0 in my latest official release build. In my development version which uses 2.19.2 the compiler correctly raises an error message.

Regards

This topic is closed to new replies.

Advertisement