views:

21

answers:

1
+2  Q: 

value_type size

is there any ways of retrieving the number of elements in

typename X::value_type

where X is a vec of tuples?

thanks

+1  A: 

If your tuple is a boost.tuple:

boost::tuples::length<X::value_type>::value

For other tuple types, you'd use something similar, but it depends on the library it's from.

Roger Pate
yes, thanks. I just found it out a minute ago within boost library. The problem is that there isn't much documentation within the code.
Banana
do you know how to set a specific element of a tuple?
Banana
@Banana: `t.get<N>() = new_value`
Roger Pate