Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-06-18 05:23:29


Ryan <ryan.gallagher_at_[hidden]> writes:

> Brian Braatz <brianb <at> rmtg.com> writes:
>> [snip]
>> // copy it to a vector
>> typedef mpl::copy
>> <
>> myset::type
>> , back_inserter< vec >
>>
>> >::type result_vec;
>>
>> mpl::for_each<result_vec>( print_type());
>> }
>> ...
>
> Try:
>
> typedef mpl::copy
> <
> mpl::begin<myset>
> , mpl::back_inserter<vec>
>>::type result_vec;

Err, no. The manual says:

  template<
        typename Sequence
      , typename In = unspecified
>
  struct copy
  {
      typedef unspecified type;
  };

There was nothing wrong with what Brian wrote, although he could have
dropped ::type from myset::type. I'm looking into the causes of his
trouble right now.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk