Boost logo

Boost Users :

From: Graham Reitz (graham.cpp_at_[hidden])
Date: 2007-07-25 14:17:46


Ok good. So it sounds like my concern isn't justified.

To be certain. Because of tuples I prefer this:

typedef boost::tuples::tuple<unsigned int, double> some_pair;
typedef std::vector<some_pair > some_pairs;

to this:
struct some_pair
{ unsigned int i; double d; };
typedef std::vector<some_pair > some_pairs;

Is tuples meant to be used like the first example?

Thanks,
Graham

On 7/25/07, Joel de Guzman <joel_at_[hidden]> wrote:
>
> Graham Reitz wrote:
> > I have been finding that the boost::tuple library is so convenient that
> > I am concerned I may be overusing it.
> >
> > For example, in situations where I might use a struct I am tend to
> > prefer a tuple. Where is a good place to draw the line in situations
> > like this? Or is this the intent to use it as often as possible?
>
> Hah! You've seen nothin' yet :-)
> :-) If you want to see tuples pushed to the limits, see Boost.Fusion.
>
> Regards,
> --
> Joel de Guzman
> http://www.boost-consulting.com
> http://spirit.sf.net
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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