On 01/27/2013 12:13 PM, Daniel Kozak wrote:
> On Sunday, 27 January 2013 at 19:55:07 UTC, rsk82 wrote:

>> What's wrong here ?
>
> class myClass () {
> this() {
>
> }
> };
>
> should be
>
> class myClass {
> this() {
>
> }
> }

Yeah... Those empty parentheses were making myClass a class template, not a class. Apparently the syntax (or the compiler) allows template definitions without template parameters, which can still be instantiated:

class myClass () {
  this() {

  }
}

int main() {
    myClass!() my_instance = new myClass!();
  return 0;
}

Ali

Reply via email to