Argumnentation against external function operator overloading is unconvincing
HaraldZealot via Digitalmars-d
digitalmars-d at puremagic.com
Wed Sep 21 23:09:39 PDT 2016
On Thursday, 22 September 2016 at 05:38:53 UTC, HaraldZealot
wrote:
> And problem with generic code solve independently for all UFCS
> functions including operators.
Unfortunately I don't know compiler and all related stuff
internally (time to change this ;) ), but it seems to me there is
a way to solve problem with UFCS and generic code without
breakage of module encapsulation. If understand correctly when we
instantiate template with struct/class we pass to template some
kind of "static signature of type" (if I may it call so). With
the static signature of type I mean all member function of class
or struct. If we instead of this before instantiate any type
(including POD) create "dynamic signature of type" which include
all visible at the moment of call function and templates for this
type.
More information about the Digitalmars-d
mailing list