Thanks in advance,
Rui Maciel
It all depends if you want a boost dependency or not. If you are already
using boost it makes no difference but even then I would still use the
std::pair in preference to a tuple of two items.
/Leigh
Yeah, if you're trying to get 1st place during amateur hour.
sherm--
huh?
>> It all depends if you want a boost dependency or not. If you are already
>> using boost it makes no difference but even then I would still use the
>> std::pair in preference to a tuple of two items.
>>
>> /Leigh
>
> Yeah, if you're trying to get 1st place during amateur hour.
In your opinion, what's the relation between std::pair and a "1st place during amateur hour" ?
Rui Maciel
> It all depends if you want a boost dependency or not. If you are already
> using boost it makes no difference but even then I would still use the
> std::pair in preference to a tuple of two items.
The added dependency is indeed a negative point. Nonetheless, other than that, is
there anything that makes one of those libraries better than the other?
Rui Maciel
IIRC, tuple is available in std::tr1 on some compilers.
> there anything that makes one of those libraries better than the other?
Depends on the usage. The pairs first/second members may be easier to
comprehend, tuple's get<n> may be more amenable to template coding, and
of course is extensible beyond a pair.
Jeff