Consider the following little program:
------------------------------------------------------------------------
template <class IntType, IntType IntVal>
struct integer {
typedef IntType value_type;
static const value_type value = IntVal;
};
template <class... TypesT>
struct tuple
{
tuple ();
tuple (const tuple&);
tuple& operator= (const tuple&);
};
#include <cstddef>
template <class... TypesT>
struct tuple_size
: integer<std::size_t, sizeof... (TypesT)> { };
#include <iostream>
int main ()
{
typedef tuple < > tuple0;
std::cout << tuple_size< tuple0 >::value << std::endl;
typedef tuple < int > tuple1;
std::cout << tuple_size< tuple1 >::value << std::endl;
return 0;
}
------------------------------------------------------------------------
Compiling with gcc-4.3 using the -std=gnu++0x option (gcc-4.3.1 was
just released BTW), I get the following output:
1
1
The first line should print '0', shouldn't it? Or no?
Brad.