Boost logo

Boost Users :

Subject: Re: [Boost-users] [TUPLE] n for an n-tuple
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-06-24 09:50:30


AMDG

Hossein Haeri wrote:
> Given an n-tuple t, is there any way to acquire n from t itself? I mean something like:
>
> tuple<int, float> t;
> size_t n = t.size();//n == 2
>

boost::tuples::length<tuple<int, float> >::value

or

boost::fusion::size(t);
(with the appropriate fusion headers)

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net