[phobos] hasMember + opDispatch + Uniform Function Call Syntax

David Simcha dsimcha at gmail.com
Fri Sep 17 17:56:49 PDT 2010


  http://d.puremagic.com/issues/show_bug.cgi?id=4880

The patch here will work for now, but I don't want to commit it because 
long-term uniform function call syntax will break it.  Any ideas for how 
to introspect whether someStruct.someMember() compiles as an actual 
member function, not a uniform syntax rewrite of a free function call?  
Of course you could check hasMember, opDispatch, (isPointer && 
hasMember!(pointerTarget)), etc., but I'd rather avoid lots of brittle 
special casing because, as both this and hasAliasing and friends show, 
you always seem to miss a few cases.


More information about the phobos mailing list