different behavior of "sizeof()"

Started by
9 comments, last by the_edd 11 years, 9 months ago

Alternative implementation:

template<typename T, std::size_t N>
std::size_t array_length(const T (&array)[N])
{
return N;
}



Face-palming somewhat right now.

This topic is closed to new replies.

Advertisement