cross_module function overloading & alias & template: how to ?

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 10 12:08:59 PST 2016


On Thursday, November 10, 2016 14:32:28 Steven Schveighoffer via 
Digitalmars-d-learn wrote:
> On 11/10/16 12:12 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
> > On Thursday, November 10, 2016 15:46:11 Picaud Vincent via
> > Digitalmars-d-
> >
> > learn wrote:
> >> -------> What am I missing? What is the right way to do that?
> >
> > Honestly, I'm surprised that the compiler let you alias
> > std.algorithm.comparison.min, because it's a templated function, and in
> > the case of templates, you alias instantiations of templates, not the
> > templates themselves.
>
> This statement is not true at all. You alias symbols. Templates are
> symbols.

Hmmm. I was sure that you couldn't, but I think that I was confusing myself
over issues having to do with partial template instantiation. So, I stand
corrected.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list