Are out-of-class-declaration method definitions allowed?

BCS none at anon.com
Thu Nov 12 20:32:55 PST 2009


Hello aJ,

> I can't imagine anyone that knows D doesn't also know C++, but the
> opposite is hardly true, so here's some valid C++ that I'm wondering
> if there is an equivalent style allowed in D:
> 
> class MyClass
> {
> public:
> void DoIt();
> };
> void MyClass::DoIt()
> {
> // do it
> }
> (Aside: D has no 'inline' keyword, correct? And, should I post
> questions like this post in the learn group? Even if the potential is
> likely that a language design discussion may result?)
> 

AFAIK That is not supported. You can do it by declaring an extern(C) function 
named with whatever that method's name mangles to ... but why? 





More information about the Digitalmars-d mailing list