www.digitalmars.com         C & C++   DMDScript  

c++.beta - 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++.
Aug 11 2003