DIP61: redone to do extern(C++,N) syntax
via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 29 02:01:47 PDT 2014
On Tuesday, 29 April 2014 at 07:50:41 UTC, Walter Bright wrote:
> Basically, Ola, if you could write a piece of sample D code
> that you feel will not work, please do so.
But I did?
framework1.d:
extern(C++,veclib){ struct … vec4 …; }
extern(C++,physics){ vec4 f(vec4 …) … }
framework2.d:
extern(C++,veclib){ struct … vec4 …; }
extern(C++,graphics){ void g(vec4 …) … }
application1.d:
import framework1;
import framework2;
graphics.g( physics.f(…) ); // you said this would not work?
-----
myframework.d
extern(C++,veclib){ struct … vec4 …; }
extern(C++,physics){ vec4 f(vec4 …) … }
extern(C++,graphics){ void g(vec4 …) … }
application2.d
import myframework;
graphics.g( physics.f(…) ); // but now it works?
More information about the Digitalmars-d
mailing list