Specifying C++ symbols in C++ namespaces
Michel Fortin
michel.fortin at michelf.ca
Thu Apr 3 13:16:43 PDT 2014
On 2014-04-03 19:43:23 +0000, Walter Bright <newshound2 at digitalmars.com> said:
> On 4/3/2014 3:36 AM, Michel Fortin wrote:
>> I'd tend to simply implement extern(C++, namespace.here), which should
>> work fine
>> to wrap single-namespace cpp files, and wait to see what are the actual
>> friction
>> points before introducing more (people can experiment with structs or other
>> modules meanwhile).
>
> You have a good point in that to go all the way with namespaces, we'd
> have to implement Koenig lookup and support insertion of names into
> previous namespaces.
>
> I can't see this happening in D.
Me neither.
> But I don't see that as much of an argument to not do simple scoping
> with namespace lookup.
What I'm saying is that it should be optional to create a new scope to
declare a C++ function from a namespace. In other words you need to be
able to put the function at module scope in D.
--
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca
More information about the Digitalmars-d
mailing list