August 30, 2013
On 8/30/13, Andrej Mitrovic <andrej.mitrovich@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");
    }
August 30, 2013
On 8/30/13, Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:
> On 8/30/13, Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:
>> I'm not looking for a workaround (there's plenty of ways to work
>> around this)
>
> Here's one way:

Sorry, better version, the second function doesn't need to be a
template (in git-head anyway):

    void opAssign(T)(T t)
        if (is(typeof(Constraint!T)) && Constraint!T)
    {
        pragma(msg, "T");
    }

    void opAssign(typeof(null))
    {
        pragma(msg, "null");
    }