Template argument deduction

bearophile bearophileHUGS at lycos.com
Tue Mar 1 04:30:26 PST 2011


Ali Çehreli:

> That's because the type of literals like [1, 2] are slices (dynamic 
> arrays), not fixed-sized arrays.

Then why is this accepted?

foo!int([[1,2],[3,4],[5,6]]); // OK

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list