Template function type inference with default arguments
Meta via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jan 3 17:23:06 PST 2015
On Sunday, 4 January 2015 at 00:22:01 UTC, ixid wrote:
> Why don't templates take a type from the default argument if
> nothing else is supplied? It would be useful to be able to use
> an enum to set a default.
I doubt anyone's ever thought of that particular use-case. Using
your typeof(MAX) workaround is probably as good as it's going to
get for the time being.
More information about the Digitalmars-d-learn
mailing list