C++ frequently questioned answers
torhu
no at spam.invalid
Sat Oct 27 16:34:52 PDT 2007
Ary Borenszweig wrote:
> In D:
>
> class Foo {
>
> private {
> int x, y;
> }
>
> static {
> float SomeGlobalVariable;
>
> this() {
> // Do some global initializations
> }
> }
> }
>
> Nope, no compiler warning here either.
>
> At least Eclipse gives you a warning saying "That method's name is the
> same as the class' name". :-)
Static constructors are allowed, they don't replace the regular
constructor. Or wasn't that what you meant?
More information about the Digitalmars-d
mailing list