Boost logo

Boost Users :

Subject: Re: [Boost-users] [type_erasure] Problem with iterators
From: Marco Guazzone (marco.guazzone_at_[hidden])
Date: 2015-01-31 10:02:15


On Fri, Jan 30, 2015 at 5:43 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
>
>>
>
> Yes, that's what I meant. The fact that it doesn't work
> is a bug. You can try using forward_iterator<_iter, const double&>.
> It isn't quite right because fwd_iter_type::value_type will
> be wrong, though. Hmmm. Try this:
> forward_iterator<_iter, const double&, std::ptrdiff_t, double>
>

Steven,

I really thank you. It works!

Just for anyone interested on this, here is the working solution (I
just put the important changes; the rest of the code is the same as
before):

    typedef mpl::vector< te::forward_iterator<_iter, const T&,
std::ptrdiff_t, T> > requirements;
    typedef te::any< requirements, _iter> fwd_iter_type;

Best,

-- Marco


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