WebFreak001
3b3757af6b
fix 22147: allow @disable this(this) T in DList!T
2023-03-12 19:49:11 +01:00
WebFreak001
e2e1bb4c57
fix isBidirectionalRange with no-postblit .back
2023-03-12 19:49:07 +01:00
Nick Treleaven
1c397ee30d
Revert back to (R r) to fix inout
2023-02-18 18:46:23 +00:00
Nick Treleaven
c7e1a1ed92
Update isSlicing docs to match code
...
Use lvalueOf instead of `(R r)` parameter as lvalueOf!R is already
needed for the other tests.
2023-02-18 15:30:14 +00:00
Steven Schveighoffer
bdc75f6c6d
Based on my tests, this should save about 56K of compiler RAM per ( #8682 )
...
instantiation of ReturnType, and some amount of compile time.
2023-02-13 07:08:01 +08:00
RazvanN7
67155f04e7
Fix Issue 23319 - std.range.Generator does not work with non-mutable elements
2022-12-05 15:24:34 +01:00
Paul Backus
be1dad3480
Fix 23453 - Generic iota should be a forward range
2022-11-03 14:39:25 -04:00
james
d2b8a15e69
Added unittest related to fix, and moved unittest related to issue to std/algorithm/iterartion.d
2022-09-19 22:27:22 +02:00
james
41959deae6
Fix issue 16034: map should be possible with a reference only
2022-09-19 16:44:10 +02:00
Paul Backus
41aaf8c263
Fix Issue 18036 - Documentation of moveFront()
...
...fails to mention different behavior depending on
hasElaborateCopyConstructor
The new wording is based on the documentation for core.lifetime.move.
2022-02-28 12:36:36 +00:00
Ate Eskola
2031d0cfc7
Style fixed.
2022-01-25 22:55:43 +02:00
Ate Eskola
664e1cf2b4
Corrected initialization, thanks Radcapricorn!
2022-01-25 22:55:43 +02:00
Ate Eskola
ab547c78c3
Changed chooseAmong implementation from recursive to linear.
2022-01-25 22:55:43 +02:00
WebFreak001
5c5a8318b3
fix phobos style in unittest
2022-01-16 01:07:22 +01:00
WebFreak001
dac59a4bde
add isSomeFiniteCharInputRange as simplification
...
combines the very common constraint
`isInputRange!R && !isInfinite!R && isSomeChar!(ElementEncodingType!R)`
and adds a bunch of documentation with examples for users to understand
it better. This should lower the neccessary needed technical insight to
read basic docs, especially std.path and std.file docs.
2022-01-15 18:38:52 +01:00
Paul Backus
e862f06eaf
Fix issue 22608 - RandomAccessInfinite is not a valid random-access range
...
Previously, isInfinite!(RandomAccessInfinite!T) would always evaluate to
false, because the 'empty' method inherited from InputRange could not be
evaluated at compile time. Since isRandomAccessRange!R requires
(isBidirectionalRange!R || isInfinite!R), this meant that
RandomAccessInfinite!T was not recognized as a random-access range.
2021-12-19 02:48:10 +00:00
Sebastian Wilzbach
63712f491c
Remove redundant access specifier from Phobos
2021-10-27 10:04:23 +03:00
Razvan Nitu
e2279cac12
Merge pull request #8284 from andralex/variadicEquals
...
RFC: alternative variadic implementation of equals
2021-10-20 10:26:37 +03:00
Razvan Nitu
e1d6e6f116
Merge pull request #8271 from dukc/fix21022
...
Fix issue 21022 - only should work with qualifiers
2021-10-19 21:05:56 +03:00
Andrei Alexandrescu
e5766c8c03
Fix related bug in EvenChunks
2021-10-19 10:42:27 -04:00
MoonlightSentinel
bb2b31f892
Fix 22383 - Reject noreturn[] as an autodecodable string
...
`noreturn[]` does not contain characters and hence is not subject to
autodecoding. The previous behaviour caused the range primitives (`put`,
...) to call into autodecoding related functions which couldn't handle
`noreturn[]`.
That error caused `isInputRange!(noreturn[])` to yield false.
2021-10-14 17:23:16 +00:00
Ate Eskola
dadfd00b5e
Added a comment about the invariant of respecting stripped qualifiers.
2021-10-14 16:14:59 +03:00
Ate Eskola
769299f70b
Fix issue 21022 - only should work with qualifiers
2021-10-13 21:32:33 +03:00
Razvan Nitu
d8e91d147c
Merge pull request #8269 from dukc/simplifyOnly
...
Swapped out custom empty `only` for a simpler empty array.
2021-10-13 21:29:18 +03:00
Ate Eskola
dc15745a4a
Swapped out custom empty only
for a simpler empty array.
2021-10-13 17:59:56 +03:00
Paul Backus
e1672cfb8d
Use a custom exception type in InputRangeObject
...
This allows users to distinguish between exceptions thrown by
InputRangeObject itself and exceptions thrown by the wrapped range.
2021-10-02 17:27:03 -04:00
Paul Backus
d15e19fc44
Fix issue 19544 - Can't call inputRangeObject on ranges not supported by moveFront
...
The range algorithms moveFront, moveBack, and moveAt do not accept all
valid input ranges, bidirectional ranges, and random-access ranges,
respectively. Their inclusion as methods of the InputRange,
BidirectionalRange, and RandomAccessFinite interfaces previously caused
InputRangeObject, which implements those interfaces, to fail to compile
when instantiated with certain valid input, bidirectional, and
random-access ranges.
These methods should not have been included in their respective
interfaces to begin with, but removing them now would break existing
code. Instead, as a workaround, InputRangeObject now implements these
methods by throwing an exception if the wrapped range does not support
them.
2021-09-29 20:35:30 -04:00
Luís Ferreira
ab73d95c31
std.range: make unittests reproducible when -boundscheck=off is present
...
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-08-29 23:06:28 +00:00
dkorpel
9ec24190b1
add explicit scope/return for pure functions
2021-07-11 13:34:25 +00:00
dkorpel
010f6b7078
use static foreach
for correct scope
inference
2021-06-08 10:21:59 +00:00
dkorpel
460ed9c619
improve documentation of SortedRange.release
2021-05-21 16:24:20 +02:00
nordlow
62d9ffb42c
Annotate std/range/package.d to please dlang/dmd#12520
2021-05-18 11:31:41 +02:00
Max Haughton
bc0a16273e
Fix Issue 21125 - Typo in std.range.refRange documentation for opIndex
2021-05-16 21:14:25 +02:00
Razvan Nitu
e78bd852a2
Merge pull request #6905 from WalterBright/save-doc
...
improve documentation for .save() property
2021-04-22 22:14:59 +08:00
berni44
b2019ebab0
Narrow imports of std.math in the rest of phobos.
2021-04-21 03:00:57 +02:00
The Dlang Bot
c87d245124
Merge pull request #7900 from CyberShadow/pull-20210321-212125
...
Improve some assertions in std.range
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2021-03-22 11:43:20 +01:00
Vladimir Panteleev
782af8cb89
std.range.package: Reduce maximum line length
2021-03-22 02:12:48 +00:00
Vladimir Panteleev
9bd2f2ba8f
std.range.package: Add messages to assertions in chain
2021-03-21 21:28:20 +00:00
Vladimir Panteleev
f45aa83b31
std.range.package: Add messages to assertions in stride
2021-03-21 21:28:20 +00:00
Vladimir Panteleev
437e68e939
std.range.package: Add messages to assertions in iota
2021-03-21 21:28:16 +00:00
Vladimir Panteleev
86d26bb7bc
std.range.package: Add missing assertion in chain.popFront/popBack
2021-03-21 21:24:40 +00:00
berni44
6f2a0934a7
Adapt imports of std.format to new structure of std.format.
2021-03-19 13:22:00 +01:00
nordlow
6452c9aead
Remove comment in doc regarding incorrectness of Transpose.save
2021-03-11 16:41:12 +01:00
nordlow
5803c21b85
Remove std.range.Transposed.save
2021-03-11 16:39:02 +01:00
Tobias Pankrath
b8811d8de0
range: add example to search a SortedRange by key member
2021-03-05 03:04:38 +01:00
Bernhard Seckinger
9cb7755041
Replace approxEqual with isClose
2021-01-28 10:39:50 +01:00
Razvan Nitu
89abc75f02
Merge pull request #7745 from kinke/emplace
...
Get rid of std.conv.emplace[Ref](), use core[.internal].lifetime
2021-01-25 15:36:04 +08:00
Nathan Sashihara
3733c9d202
Fix Issue 21559 - Speed up walkLength for narrow strings
2021-01-19 10:49:21 -05:00
Martin Kinkelin
1a459c5996
Get rid of std.conv.emplace[Ref](), use core[.internal].lifetime
...
The emplace() stuff was moved to druntime; for some reason, it's still
in Phobos.
I've diffed the two versions, and they are still almost identical (incl.
unittests); the druntime version appears to have seen some improvements
(e.g., forwarding r/lvalueness of the arguments) in the meantime.
2021-01-17 16:02:25 +01:00
mhh
c0585bcfa7
Line length
2021-01-17 04:57:51 +00:00