[Issue 2972] [tdpl] Can't overload non-templated function against template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 7 14:31:27 PST 2011


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


Andrei Alexandrescu <andrei at metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei at metalanguage.com
            Summary|Can't overload              |[tdpl] Can't overload
                   |non-templated function      |non-templated function
                   |against template            |against template


--- Comment #2 from Andrei Alexandrescu <andrei at metalanguage.com> 2011-12-07 14:31:24 PST ---
Breaks TDPL example, stylized below:

module main;

import std.stdio;

void overloadme(uint number)
{
    writeln("This is overloadme with uint.");
}

void overloadme(long number)
{
    writeln("This is overloadme with long.");
}

void overloadme(T)(T number)
{
    writeln("Generic overloadme called.");
}

int main(string[] argv)
{
    overloadme(25);
    overloadme("Bla");

    writeln("\nFinished");
    readln();
    return 0;
}

-- 
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