On 2011-09-11 17:07, Daniel Murphy wrote:
"Jacob Carlborg"<d...@me.com>  wrote in message
news:j4i33b$1bc2$1...@digitalmars.com...
I find this strange:

D can call C++ free functions and virtual member functions but it cannot
call non-virtual or static member functions.

Especially not be able to call static member functions are strange. I
thought that free functions and static member functions where implemented
in the same way. As far as I know they are implemented in the same way in
D.

--
/Jacob Carlborg

Adding the C++ interfacing capability was well before my time, so I'm not
sure how it ended up with the current limitations.  Maybe someone else does?
I think the issue with static member functions is getting the name
mangling/linking to work, this is obviously never a problem for virtual
functions, and is simpler for free functions.  I'll have a go at this
eventually if nobody beats me to it.

Virtual functions needs to be mangled as well. The only thing that, at least I know about, differs from a free function and a static member function is the mangling.

--
/Jacob Carlborg

Reply via email to