Commit graph

94 commits

Author SHA1 Message Date
Iain Buclaw
fd5facfe04 posix.mak: Enforce whitespace before opening parenthesis for version conditions 2018-09-22 16:57:24 +02: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
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
40f1c4c429 [Trivial] Skip Unittests on mismatched_args_check, remove std.range.primitives 2018-03-27 11:00:11 -04:00
Jack Stouffer
b10151ab9e Add examples to std.range.primitives and enable dscanner check 2018-03-20 16:27:48 -04:00
Jonathan M Davis
1436fca1cc Add website link to author name for Jonathan M Davis. 2018-03-10 16:31:23 -07:00
Jack Stouffer
663b5b9278 Revert addition of StdUnittest 2018-02-20 13:32:32 -05:00
Jack Stouffer
18cbb29b04 Replaced version(unittest) blocks with version(StdUnittest) 2018-02-01 19:56:59 -05:00
Jack Stouffer
c9122a534a Added more examples to std.range.put 2018-01-17 13:46:59 -05:00
Jack Stouffer
6909455910 Make the behavior of put with slices clear 2018-01-16 10:57:21 -05:00
Sebastian Wilzbach
7de3787876 Use static foreach in Phobos 2018-01-03 17:30:11 +01:00
Sebastian Wilzbach
45760aa001 Add @safe to unittest in std.range 2017-12-17 20:43:06 +01:00
Sebastian Wilzbach
9e58ebb708 Add platform-dependent tests for std.range.hasLength 2017-12-13 09:11:45 +01:00
Sebastian Wilzbach
b97afe2016 Move deprecations along: std.range.hasLength 2017-12-13 07:25:44 +01:00
Johan Engelen
e0e015d03f
[Trivial] improve documentation of popBackN
note that the popBackN doc is shared with popFrontN. This change moves the description of popBackN up, such that it is closer to where the reader will want to find it. Also adds more explicit mention of popFrontN, such that it is clear which one of the two is being described.
2017-12-03 14:37:13 +09:00
Johan Engelen
5f05f489af
[Trivial] Fix typo 2017-12-01 18:37:18 +09:00
RazvanN7
8525d60821 Replace hasLength 2017-10-12 11:14:09 +03:00
RazvanN7
a3a9fc5b80 Fix documentation 2017-10-09 16:37:54 +03:00
RazvanN7
bf1c178382 Fix Issue 6409 - std.array.empty for associative arrays too 2017-09-07 19:29:18 +03:00
H. S. Teoh
4501f5520a Add unittest. 2017-08-10 10:19:18 -07:00
H. S. Teoh
be9ad6a311 Fix issue 17661: isInputRange should work with .front that returns reference to parameter. 2017-08-09 17:03:47 -07:00
Andrei Alexandrescu
82c3371d85 Convert range primitives to CNF like a boss 2017-07-16 00:40:24 +02:00
Sebastian Wilzbach
625dfeeb87 Merge pull request #4827 from andralex/length
Restrict length
2017-06-16 19:21:20 +02:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
This reverts commit 998ad51fd7.
2017-06-13 17:51:52 +00:00
Andrei Alexandrescu
72f3950843 Fix Issue 16566 - hasLength should enforce that length has type size_t 2017-06-13 07:21:55 +02:00
Sebastian Wilzbach
998ad51fd7 Sort selective imports 2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d Sort imports 2017-06-12 07:54:38 +02:00
Andrei Alexandrescu
994dbce134 Eliminate redundant __gshared, immutable data is shared already 2017-06-11 15:13:31 -04:00
Sebastian Wilzbach
090d5164e8 Fix links from $(LREF $(D ...)) -> $(LREF ...)
sed -E 's/[$]\(D [$]\(LREF (.*)\)\)/$(LREF \1)/' -i **/*.d
2017-03-05 08:11:29 +01:00
Sebastian Wilzbach
64760be50f std.range: remove quick index and fix docs (part 2) 2017-03-01 03:59:38 +01:00
Andrei Alexandrescu
30724e67d9 Merge pull request #5166 from wilzbach/dscanner-unittest-safe-or-system
Dscanner: let unittest be @safe or @system
2017-02-22 14:44:08 -05:00
Sebastian Wilzbach
a36cec8686 DScanner: automatially set all unattributed unittests to @safe or @system 2017-02-22 05:42:04 +01:00
Sebastian Wilzbach
425ab667a3 Automatically set the range style from a..b -> a .. b
Commands:

sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
Sebastian Wilzbach
5521541032 Unify assert style to have no spaces between the first brace
Application of:

sed -E "s/assert +\(/assert(/" -i **/*.d
2017-02-21 15:27:15 +01:00
Sebastian Wilzbach
87dec58a41 DStyle: Constraints on declarations should have the same indentation level 2017-02-17 07:36:23 +01:00
Sebastian Wilzbach
8d5b051235 Provide reference to other common names 2017-02-16 02:57:51 +01:00
Nick Treleaven
759da8eec0 swapRanges: Remove redundant constraint tests
hasSwappableElements already tests for isInputRange.
Also fix hasSwappableElements docs.
2017-02-15 17:21:21 +00:00
Sebastian Wilzbach
cc7f125ed1 Add missing imports to public unittests 2016-12-15 23:23:35 +01:00
Jonathan M Davis
1a8cfa7029 Require that popFront and popBack be callable without parens.
Technically, prior to this change, it was possible to define popFront
and popBack to be callables that required parens - such as member
variable with an overloaded opCall or a delegate. It's unlikely that
anyone has actually declared popFront or popBack in this manner, but
it's possible. Because of that, calling popFront or popBack without
parens would technically not work with some valid ranges (even if such
ranges are unlikely to exist) and thus without this change, it's
arguably not valid to call popFront or popBack without parens in generic
code - especially in the standard library.

Andrei wants to be able to call popFront without parens in generic code,
and when I pointed out the existing problem with that, he wanted me to
change it so that it's no longer legal to have a range where popFront or
popBack is a callable that requires parens. So, this PR fixes that.

Now, technically, this is a breaking change, but it's highly unlikely
that it actually breaks any code, and I don't know of any way to do this
change in a way which would allow for any kind of deprecation message
for anyone trying to declare a range with a popFront or popBack that
would not work without parens. So, as far as I can tell, if we want to
make this change, we're stuck making a breaking change, but the odds of
it actually mattering seem low.
2016-11-25 10:42:29 -08:00
UplinkCoder
8bed6b2843 15% more performance for popFront(char[]) 2016-10-12 20:14:47 +02:00
Andrei Alexandrescu
71dc211e69 Merge pull request #4848 from andralex/popFront
Tighten popFront
2016-10-10 18:22:31 -04:00
Andrei Alexandrescu
28b6b462b8 Tighten popFront 2016-10-09 18:04:14 -04:00
Per Nordlöw
0e448d2780 Update primitives.d
Fix typo in explanation.
2016-10-09 22:55:48 +02:00