overloading between templates and non-templates

Steven Schveighoffer schveiguy at yahoo.com
Tue Dec 14 10:48:27 PST 2010


On Tue, 14 Dec 2010 13:17:11 -0500, #ponce <cont4ct at gamesfr0mmar5.fr>  
wrote:

> In D2 :
>
>
> 1/ Is it valid to have two functions with the same name, one templated  
> and another not ? I remember a NG thread but cannot find it.

Yes, but it's not properly implemented.  The ability is specified in TDPL.

There is a bug somewhere I think.

> 2/ If (1)'s answer is yes, is it equivalent to a template specialization?

I would have to guess yes (the opposite makes no sense), but I'm unsure of  
the full semantics (don't have a copy of TDPL).  What's unclear to me is  
if the argument implicitly converts what is chosen.

-Steve


More information about the Digitalmars-d-learn mailing list