overloading functions against function templates
BCS
ao at pathlink.com
Thu Jul 30 14:58:04 PDT 2009
Reply to Walter,
> Currently, that can't be done. But it would be good to get it in for
> D2. The question is, what rule to use?
>
> I suggest that:
>
> 1. if any functions match, then overload functions the usual way
>
> 2. if no functions match, then overload the function templates the
> usual way
>
> Or reverse the priority of the two.
>
> What do you think?
>
That sounds good.
One other option would be to go with:
1. if any function matches exactly, then use it
2. if no function match exactly, then overload the function templates the
usual way.
3. take the resulting function from step #2 and add it into the non-template
overload list and process it the usual way.
More information about the Digitalmars-d
mailing list