There are two methods for extracting individual element of an ntuple<>
Use member get< N >() (also at< N >()) to return a reference to the element at position N.
Member at< N >() has exactly the same behaviour as get< N >().
Use the extractor >> to assign to its right-hand side the 0th element.
As the extractor returns the ntuple<...>::remainder() (a tuple of the elements 1 through tuple_size - 1) the extractors can be chained.
ntuple< int, double, char, bool > idcb( 1, 2.0, 'c', false ); char c; bool b; std::cout << ( c = idcb.get< 2 >() ) << ','; std::cout << std::boolalpha << ( b = idcb.at< 3 >() ) << std::endl; int i; double d; idcb >> i >> d; CHECK( i = 1 && d == 2.0 && c == 'c' && !b );
Test Result: gcc34 Passed, msvc80 Passed, msvc71 Passed
Output
c,false