dranges.experiments
To Be Documented.
I put in this module some not-quite-ranges, and some plays on the concept of ranges.
Some of these ideas have been promoted to modules: tuple, variadic.
License:
Boost License 1.0.
Authors:
Philippe Sigaud
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- struct
BiInfiniteRange
(R1,R2) if (isForwardRange!(R1) && isForwardRange!(R1) && isInfinite!(R1) && isInfinite!(R2) && !isBidirectionalRange!(R1) && !isBidirectionalRange!(R2) && CompatibleRanges!(R1,R2));
- Not really a standard range, used to modelize:
... infinitely many values ... -2 -1 0 1 2 ... infinitely many values ...
^
As such, it has no real center, only a current element.
Difference with InfiniteBiDir: IBD consumes the inner ranges with popFront/popBack. Here no, the
range is infinite at both ends and front is in fact only an index. popFront advances the index,
popBack get it back one position. Back is not really useful in this case (but defined all the same)
and is just the element one position before (left of) front.
It uses the standard front/back/popX methods, but it's not really a range and doesn't respect the
semantics of popFront/popBack.
There is also a reset() method, to get back to the initial (as creation) position.
It's implemented either with two non-bidir infinite ranges or a generative function.
- struct
BiInfiniteRange
(G);
- Generating a bi-infinite range with a function.
|