Specifying C++ symbols in C++ namespaces

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Apr 3 15:19:52 PDT 2014


On Thu, Apr 03, 2014 at 12:43:59PM -0700, Walter Bright wrote:
> On 4/3/2014 4:06 AM, Daniel Kozák wrote:
> >I think we should distinguish modules lookup from namespaces lookup.
> >Something like this:
> >
> >A.B.foo() // call foo function from module/struct/class A and B
> >#A.#B.foo // call foo function from namespaces A and B
> >or
> >A::B.foo // call foo function from namespaces A and B
> >or
> >/A/B.foo // call foo function from namespaces A and B
> 
> 
> Please, no!

The current situation where module/scope qualifiers clash with UFCS sux,
though.

	static import std.algorithm;
	...
	auto myRange = ...;
	//myRange.std.algorithm.find(...);	// NG :-(

	alias find = std.algorithm.find;
	myRange.find(...);			// OK

But this is kinda tangential to this topic. :P


T

-- 
My program has no bugs! Only undocumented features...


More information about the Digitalmars-d mailing list