August 12, 2003 template non-type parameter | ||||
---|---|---|---|---|
| ||||
template <class Type, int size> Type min( const Type (&r_array)[size] ) { return r_array[0]; } void main() { const int ia[5]={40,20,49,17,28};[5]¡£ min(ia); } This was legal by C++ but DMC++. |
Copyright © 1999-2021 by the D Language Foundation