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


Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com


--- Comment #5 from Steven Schveighoffer <schvei...@yahoo.com> 2012-04-04 
07:30:43 PDT ---
I would suggest instead of using the instantiation scope, use the scope of the
defined type.  Then the notion of "LOCAL" templates is not needed.

For example, if struct S is defined in foo.d, and you instantiate template
function func in bar.d:

void func(T)(T t)
{
   t.baz();
}

and baz is not a member function, look it up from two scopes -- the template
definition scope (i.e. bar.d) and the scope where S is defined (i.e. foo.d). 
This means S's API, including UFCS, is identical no matter where you use it
from.  Prefer type definition scope over template definition scope, to keep the
type's API intact.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to