template < typename T> struct arrdef { typedef T type; static const std::size_t size = 0; }; // If X happens to be an array type, e.g. typedef Y X[K]; // arrdef< X>::type == Y, arrdef< X>::size == K template < typename T, std::size_t N> struct arrdef< T[N]> { typedef T type; static const std::size_t size = N; };
[ Home | Post Entry | Log in | Search | Browse Options | Site Map ]
no subject