compile error while use `extern(C++, class)`

mogu via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Aug 18 04:11:10 PDT 2016


On Thursday, 18 August 2016 at 10:45:14 UTC, Lodovico Giaretta 
wrote:
>
> Which kind of error? An error message by the compiler? One by 
> the linker? The compiler crashes?
>

Compiler Error exactly. The minimal code is(dmd or ldc2 in ubuntu 
16.04 lts):
```
extern (C++, struct)
class A {}
```

Error: identifier expected for C++ namespace found 'struct' when 
expecting ')' declaration expected, not ')'



More information about the Digitalmars-d-learn mailing list