Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2008-08-20 10:42:29


Markus Werle wrote:
> Joel de Guzman <joel <at> boost-consulting.com> writes:
>
>> Markus Werle wrote:
>>
>>> And this here fails:
>>>
>>> #include <boost/assign/list_of.hpp>
>>> #include <boost/assign/list_inserter.hpp>
>>> #include <boost/tr1/tuple.hpp>
>>>
>>> #include <list>
>>>
>>> int main(int argc, char* argv[])
>>> {
>>> typedef std::list<std::tr1::tuple<int, std::string> > mod_list_t;
>>>
>>> static mod_list_t const l =
>>> boost::assign::tuple_list_of(1, "A")(2, "B");
>>>
>>> return 0;
>>> }
>>>
>>>
>>> Any hint?
>> I'm not familiar with boost assign. Could you please provide a test
>> case that does not use boost.assign?
>
> Actually I played around with boost::assign and tried to fix this myself.
> The problem is that boost::assign::tuple_list_of(...) returns something
> that is convertibel to std::list<boost::tuple<int, string> >, but not
> to std::list<std::tr1::::tuple<int, string> >.
>
> Is it hard work and/or useful to make this compile?

I think you are looking at the wrong solution. The solution is to
ask the boost.assign authors to support TR1 tuple.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

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