Mixin a constructor ?
language_fan
foo at bar.com.invalid
Sat Sep 19 18:17:36 PDT 2009
>> template C ()
>> {
>> this (int i)
>> {
>> }
>> }
>> class A
>> {
>> mixin C;
>> this ()
>> {
>> }
>> }
>> void main ()
>> {
>> auto a = new A(3);
>> }
Since the constructor has no meaning outside classes, should it be
interpreted as a free function if mixed in a non-class context? I really
wonder how this could be valid code. Does the grammar even support the
3rd line?
More information about the Digitalmars-d
mailing list