Commit graph

451 commits

Author SHA1 Message Date
Martin Nowak
8430584344 fix Issue 19777 - SortedRange.opSlice should infer safety
- unittests did fail with DIP1000 due to missing return scope
  inference in chained range, thus leading to a scope violation
  which prevented `@safe` inference
- fixed unittests by adding return scope to chain.Result
- would still fail under dip1000 with other ranges that
  miss return scope on their opSlice
- should not have any effect on non-DIP1000 usage
2019-04-28 14:24:03 +02:00
Sebastian Wilzbach
d2753fda5f Merge remote-tracking branch 'upstream/stable' into merge_stable 2019-04-14 12:55:19 +02:00
aG0aep6G
98ddb30ea5 fix buildkite build
This works around some compiler bug that would manifest as undefined
symbols.
2019-04-12 18:40:17 +02:00
Sebastian Wilzbach
5c3f7f5783 Merge remote-tracking branch 'upstream/stable' into merge_stable 2019-04-09 18:45:49 +02:00
aG0aep6G
5d3fba6dbb fix safety of ChooseResult.save 2019-04-09 16:00:41 +02:00
Andrei Alexandrescu
f5bf7b222f
Relax const requirement for empty primitive
Refer to discussion in https://forum.dlang.org/post/q7tvg0$2tdn$1@digitalmars.com.
2019-04-06 00:03:04 -04:00
aG0aep6G
b8610beec3 use constructors instead of move 2019-03-31 15:25:03 +02:00
Rainer Schuetze
2e13c10025 add workaround for https://issues.dlang.org/show_bug.cgi?id=2396 to reduce compile time of unittests 2019-03-29 12:12:53 +01:00
aG0aep6G
aeea9598bd make roundRobin compatible with RefRange
Part of a series on issue 18657.
2019-03-26 21:42:21 +01:00
aG0aep6G
3ef957baf5 make cycle compatible with RefRange
Part of a series on issue 18657.
2019-03-26 21:40:40 +01:00
aG0aep6G
be9020a369 make choose compatible with RefRange
Part of a series on issue 18657.
2019-03-24 15:19:51 +01:00
aG0aep6G
b1b8b7968f make chain compatible with RefRange
Part of a series on issue 18657.
2019-03-24 15:19:51 +01:00
David Nadlinger
6b97ae69d7 std.range.primitive.{Autodecoding -> autodecodeStrings}
This follows Phobos naming conventions and is more self-documenting.
2019-03-23 19:32:56 +00:00
Walter Bright
158fb2f656 add std.range.primitives.Autodecoding 2019-03-23 01:57:04 -07:00
Andrei Alexandrescu
43a9cae2d6 Remove redundant constraint from empty() range primitive 2019-03-18 18:45:41 -04:00
Walter Bright
a7a847013e ChooseResult: use of unions need to be @trusted 2019-03-14 19:08:05 -07:00
Walter Bright
0855194862 std.range.package.d dip1000 2019-03-04 01:59:04 -08:00
The Dlang Bot
842317afa5
Merge pull request #6871 from WalterBright/only-return
range.only() returns its parameters
merged-on-behalf-of: Walter Bright <WalterBright@users.noreply.github.com>
2019-02-22 23:05:47 +01:00
Walter Bright
0d6adfb4a1 range.only() returns its parameters 2019-02-22 12:50:43 -08:00
The Dlang Bot
3fb2483ff2
Merge pull request #6865 from jondegenhardt/padright-code-coverage
Fix issues 19042, 19681 - std.range.padRight bugs
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-02-18 15:09:26 +01:00
Walter Bright
d6b4093853 SortedRange.opSlice() should be return scope 2019-02-17 03:35:53 -08:00
Jon Degenhardt
699eda195a
Fix issues 19042, 19681 - std.range.padRight bugs 2019-02-17 00:28:44 -08:00
Jon Degenhardt
9f545db860 Fix issues 19644, 19647 - std.range.takeOne.opSlice bugs (#6853)
Fix issues 19644, 19647 - std.range.takeOne.opSlice bugs
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2019-02-08 17:06:53 +01:00
Nathan Sashihara
4cc47e6dc2 Fix Issue 19364 - Decrease template bloat for string functions
Use const(E)[] instead of E[] when it is valid and doesn't change the
return type.
2018-11-18 15:39:29 -05:00
Nicholas Wilson
46e0074f03
Don't shorten the width of the iteration variable 2018-11-11 14:33:26 +08:00
Martin Nowak
a8e9857756 fix Issue 19337 - cannot call std.algorithm.sort twice
- introduced with #6535 which stripped nested SortedRange types
  in assumeSorted, thus causing a mismatch between the return type
  of sort (SortedRange!(SortedRange!R)) and assumeSorted SortedRange!R
- fix by stripping nested SortedRange types in the SortedRange!R
  template instantiation
2018-11-05 15:43:25 +01:00
devel
aaa00b7232 Fix Issue 19289 - std.range.transposed with enforceNotJagged not throwing 2018-10-06 10:53:31 -04:00
Iain Buclaw
fd5facfe04 posix.mak: Enforce whitespace before opening parenthesis for version conditions 2018-09-22 16:57:24 +02:00
Martin Nowak
f8bd6e7c14 Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-08-06 18:25:48 +02:00
Sebastian Wilzbach
fc2a1d0e11 Fix Issue 19082 - Cannot inline "...Slides.numberOfFullFrames", "...Slides.gap" 2018-07-29 15:29:40 +02:00
Sebastian Wilzbach
785b9bb39d
Merge pull request #6642 from JinShil/fix_197107
Fix warning in std.range.package - calling without side effects discards return value
2018-07-26 11:23:51 +02:00
JinShil
c1a246a0dc Fix warning in std.range.package - calling without side effects discards return value 2018-07-26 17:00:46 +09:00
The Dlang Bot
0e8722abbd
Merge pull request #6471 from schveiguy/putstrings
char[] and wchar[] should be output ranges
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-06-29 10:04:28 +02:00
Nathan Sashihara
9112e31e50 Fix Issue 18933 - std.range.assumeSorted should not nest SortedRange!(SortedRange!(...), pred) 2018-06-18 17:12:32 -04:00
Walter Bright
a6f0c855e9 add scope to NullSink 2018-06-08 17:42:52 -07:00
Sebastian Wilzbach
c324714fde Remove a few cases of underscore escaping 2018-06-04 13:05:01 +02:00
Steven Schveighoffer
30e0d82b18 Update documented unit test now that char[] can be an output range. 2018-04-24 11:12:29 -04:00
Steven Schveighoffer
8769ea9e46 Fix issue 18790 - Add ability for char[] and wchar[] to be output ranges. 2018-04-23 09:17:49 -04:00
The Dlang Bot
e13e3889ac
Merge pull request #6435 from JackStouffer/input-range-link
Make references to input ranges a link to isInputRange
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-04-15 01:42:45 +02:00
Steven Schveighoffer
d4a35f09da More removal of version(unittest) 2018-04-13 12:20:02 -04:00
Sebastian Wilzbach
4c016d129f Remove superfluous _range used to avoid auto-highlighting 2018-04-09 21:31:57 +02:00
Jack Stouffer
e14f89e170 Make references to input ranges a link to isInputRange 2018-04-08 16:19:57 -04:00
Sebastian Wilzbach
42894784dd Markdownify Phobos
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
Jack Stouffer
f7c76e605d Add example to chain explaining char corner cases 2018-03-31 13:05:52 -04:00
The Dlang Bot
1db9cbedd8
Merge pull request #6307 from n8sh/zip-shortest
Fix Issue 18638 - The main override of std.range.zip could infer @nogc and nothrow
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2018-03-30 03:38:47 +02:00
Jack Stouffer
40f1c4c429 [Trivial] Skip Unittests on mismatched_args_check, remove std.range.primitives 2018-03-27 11:00:11 -04:00
Nathan Sashihara
259cf754bb Fix Issue 18638 - The main override of std.range.zip could infer @nogc and nothrow
ZipShortest impl. a bit more efficient than Zip because doesn't need
switch statements with code for each stopping policy. Also in some cases
only needs to check one range for `empty` or `length` rather than all.
Also correctly handles `back` when ranges have unequal lengths.
2018-03-26 20:19:01 -04:00
Sebastian Wilzbach
87301eb1b5 Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-03-25 18:23:14 +02:00
Sebastian Wilzbach
8f86a0d734 Fix if constraints indentation 2018-03-24 13:17:53 +01:00
Sebastian Wilzbach
1466e23360 std.range: Add example for withPartial for slide + improve docs 2018-03-22 15:15:12 +01:00