|
Boost : |
From: Persson Jonas (jonas.persson_at_[hidden])
Date: 2003-10-30 06:49:27
Hello,
I just started experimenting with variant and ran into the following unexpected behaviour:
int main() {
typedef boost::variant<> Var0;
typedef boost::variant<int> Var1;
typedef boost::variant<int,float> Var2;
typedef boost::variant<int,float,bool> Var3;
int s0 = boost::mpl::size<Var0::types>::type::value;
int s1 = boost::mpl::size<Var1::types>::type::value;
int s2 = boost::mpl::size<Var2::types>::type::value;
int s3 = boost::mpl::size<Var3::types>::type::value;
std::cout << s0 << ',' << s1 << ',' << s2 << ',' << s3 << std::endl;
}
>From this I expected the output:
0,1,2,3
but I got:
1,1,2,3
I'm runing the latest CVS version.
/ Jonas
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk