Template overload causing an error even when a better non-template match is found
Andrej Mitrovic
andrej.mitrovich at gmail.com
Fri Aug 30 06:28:17 PDT 2013
On 8/30/13, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> I'm not looking for a workaround (there's plenty of ways to work
> around this)
Here's one way:
void opAssign(T)(T t)
if (is(typeof(Constraint!T)) && Constraint!T)
{
pragma(msg, "T");
}
void opAssign(T)(T t)
if (is(T == typeof(null)))
{
pragma(msg, "null");
}
More information about the Digitalmars-d-learn
mailing list