Boost logo

Boost Users :

Subject: Re: [Boost-users] [Fusion] How to join more than two sequences
From: Larry Evans (cppljevans_at_[hidden])
Date: 2010-09-22 11:38:10


On 09/22/10 07:33, Larry Evans wrote:
> On 09/21/10 19:31, Clinton Mead wrote:
>>
>>
>> On Wed, Sep 22, 2010 at 1:22 AM, Larry Evans <cppljevans_at_[hidden]
>> <mailto:cppljevans_at_[hidden]>> wrote:
>>
>> Couldn't fold be used to join any number of sequences?
>>
>> -Larry
>>
>>
>> Hi Larry
>>
>> Something like?
>>
>> ? join_all(seq)
>> {
>> return fold(seq, vector<>(), join<?, ?>());
>> }
>>
>> Could you fill in the question marks?
>>
>
> To be honest, I really was only
> guessing fold would work.
> I've never actually used it do to something
> like this; hence, I'm not the best
> person to help you :(
>
> However, I'm wondering why:
>
> http://www.boost.org/doc/libs/1_44_0/libs/fusion/doc/html/fusion/algorithm/iteration/functions/fold.html
>
> doesn't help oneself 'fill in the question marks'?
>

The attachment shows my try; however, it fails to compile
with the error:

fold_join.cpp:87:47: instantiated from here
/home/evansl/prog_dev/boost-svn/ro/trunk/boost/fusion/support/detail/category_of.hpp:15:38:
error: 'const boost::fusion::joint_view<const boost::fusion::vector<>&,
boost::fusion::vector<tu<int>, tu<char>, tu<double> >&>&' is not a
class, struct, or union type

Anyone have an idea what's wrong?

-Larry




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