range.primitive: Support non copyable elements

... in all ranges.
This commit is contained in:
2018-11-19 21:37:58 +01:00
parent 7585bf59e7
commit e67a05138e
7 changed files with 133 additions and 58 deletions

View File

@ -3,13 +3,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Range adapters.
* Iteration algorithms.
*
* A range adapter wraps another range and modifies the way, how the original
* These algorithms wrap other ranges and modify the way, how the original
* range is iterated, or the order in which its elements are accessed.
*
* All adapters are lazy algorithms, they request the next element of the
* adapted range on demand.
* All algorithms in this module are lazy, they request the next element of the
* original range on demand.
*
* Copyright: Eugene Wissner 2018.
* License: $(LINK2 https://www.mozilla.org/en-US/MPL/2.0/,

View File

@ -19,6 +19,7 @@ static import tanya.memory.op;
import tanya.meta.trait;
import tanya.meta.transform;
import tanya.range;
version (unittest) import tanya.test.stub;
private void deinitialize(bool zero, T)(ref T value)
{
@ -554,10 +555,6 @@ if (isInputRange!Range && hasLvalueElements!Range)
@nogc nothrow pure @safe unittest
{
static struct NonCopyable
{
@disable this(this);
}
NonCopyable[] nonCopyable;
initializeAll(nonCopyable);
}