[Issue 4217] Function overloads are not distinguished when instantiating templates
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 12 10:12:37 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4217
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |k.hara.pg at gmail.com
--- Comment #4 from Kenji Hara <k.hara.pg at gmail.com> 2010-10-12 10:12:03 PDT ---
Tested similar code:
--------
template Seq(T...){ alias T Seq; }
class A{
int f() const{ return 0; }
int f() immutable{ return 0; }
}
alias Seq!(__traits(getOverloads, A, "f")) Overloads;
template Typeof(alias a)
{
pragma(msg, typeof(a));
alias typeof(a) Typeof;
}
static assert(is(Typeof!(Overloads[0]) == typeof(Overloads[0])));
static assert(is(Typeof!(Overloads[1]) == typeof(Overloads[1]))); //should be
OK
--------
It is important for writing meta.algorithm against overload set.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list