Specifying C++ symbols in C++ namespaces
Dicebot
public at dicebot.lv
Fri Apr 4 11:54:21 PDT 2014
On Friday, 4 April 2014 at 18:51:21 UTC, Simen Kjærås wrote:
> I have to say I like Robert Clipsham's idea best:
>
> extern(C++) module nspace {
> int foo(); // Is this also extern(C++)? I think it should
> be.
> }
>
> extern(C++) module nspace {
> module innernspace {
> int bar(); // Also extern(C++), if we follow the
> example above.
> }
> }
All solutions based on binding extern(C++) to some D
qualification entity are bad because they confuse reader into
thinking that `bar` is actually `nspace.innerspace.bar` and that
should never happen.
More information about the Digitalmars-d
mailing list