|
Boost Users : |
Subject: Re: [Boost-users] a tuple from a pair?
From: Krzysztof Żelechowski (giecrilj_at_[hidden])
Date: 2011-10-07 05:18:24
Lars Viklund wrote:
> Are you sure you're not misunderstanding what your implementation does?
> VC10 and GCC 4.4.5 makes (rightfully so) a 1-tuple with an element of
> type pair<T1,T2> when invoking make_tuple with a pair.
>
What I mean is this:
#include <boost/tuple/tuple.hpp>
void trigger (::std:: pair < int, int > const &p)
{ ::boost:: get < 0 > (::boost:: tuple < int, int > (p)) == p. first; }
error:
no matching function for call
to âboost::tuples::tuple<int, int>::tuple(const std::pair<int, int>&)â
Compare:
#include <tr1/tuple>
void trigger (::std:: pair < int, int > const &p)
{
::std:: tr1:: get < 0 > (::std:: tr1:: tuple < int, int > (p)) == p. first;
}
I guess this, and Joelâs comment about boost fusion, means boost tuple
should be deprecated.
Chris
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