extern(C++, NS)
Ola Fosheim Grøstad via Digitalmars-d
digitalmars-d at puremagic.com
Mon Nov 30 02:26:07 PST 2015
On Sunday, 29 November 2015 at 11:13:03 UTC, Ola Fosheim Grøstad
wrote:
> On a related note, does D support inline namespaces? Apparently
> it affects mangling:
>
> http://stackoverflow.com/questions/29764869/can-inline-namespaces-be-used-to-keep-backwards-compatibility-in-a-shared-librar
>
> I use inline namespaces quite a bit and am curious of how D
> resolves those.
I wish someone would shed som light on this as inline namespaces
is what libraries will use in the future in order to do
versioning and target different architectures, the one marked
"inline" is made active and can be directly accessed through
"X::decl" or "X::version1::decl" in c++:
namespace X {
inline namespace version1 {
decl....
}
namespace version2 {
decl....
}
}
Seems to me that D needs to embed clang and that the current
bindings-only approach will not survive C++11 and later standards.
More information about the Digitalmars-d
mailing list