Date: 2007-02-13 04:22 am (UTC)
Вот так, к примеру:

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;
};
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
181920 21 222324
25 262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 28th, 2025 05:20 pm
Powered by Dreamwidth Studios