
Hello, someone could tell me what is wrong in this piece of code #include "boost/tuple/tuple.hpp" using namespace boost::tuples; int main(){ tuple<int, double> t2(); get<0>(t2)=int(10); } I get the following error message: g++ try.cpp try.cpp: In function ‘int main()’: try.cpp:5: error: no matching function for call to ‘get(boost::tuples::tuple<int, double, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> (&)()) In the tutorial it is written that tuple<int, double> t2() should construct the object via the default constructor. Why I cannot access the first element (it works if I give an initial value, for instance using tuple<int, double> t2(1); I get a similar error if I use the method get<N>() instead of the function. I am using gnu compiler gcc version 4.4.1 (GCC) in a i386 linux machine. Thank you, Luca -- Luca Formaggia