Boost logo

Boost Users :

Subject: Re: [Boost-users] Sequence of boost::logic::tribools - let indeterminate entries inherit from their neighbours
From: Jens Müller (blog_at_[hidden])
Date: 2014-05-08 06:43:50


Am 06.05.2014 22:22, schrieb Nat Goodspeed:
> On Mon, May 5, 2014 at 2:11 PM, Jens Müller<blog_at_[hidden]> wrote:
>
>> >I have a sequence of tribools and I want element with a indeterminate value
>> >to inherit from their neighbours.
> Hmm, so they pass on "tribool knowledge"?
>
> (sorry)

Sort of, yeah.

My current idea is actually a sort of proxy output iterator which keeps
a counter of "pending" indeterminate tribools and flushes them to the
proxied output iterator once their status becomes known. It should also
automatically flush in it's destructor.

Then I could just use std::copy with a std::back_inserter in order to
convert a sequence including indeterminate values into a sequence just
containing bools.

Useful?

BR, Jens


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