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
Jack Stouffer
67d44e4cdc
Remove package wide std.algorithm imports from Phobos
2016-09-22 08:36:14 +01:00
Rainer Schuetze
0d213a9288
Fix issue 16385: do not pass 0 to bsr, it has undefined return value
2016-08-14 11:31:53 +02:00
Jack Stouffer
1dd85d4089
Make the Phobos rules/assumptions of input ranges clearer
2016-07-18 14:15:59 -04:00
Andrei Alexandrescu
b3cf5d5e6e
Merge pull request #4313 from wilzbach/public_document_range
...
std.range: document public methods
2016-06-18 04:30:55 -04:00
Sebastian Wilzbach
ec47ac4224
Remove the WEB macro in favor of HTTP
...
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Sebastian Wilzbach
493c989770
std.range: document public methods
2016-06-03 22:39:29 +02:00
Dmitry Olshansky
2bc17e8a10
Merge pull request #4375 from wilzbach/remove_weird_authors
...
remove placeholder copyright
2016-06-01 12:55:32 +04:00
anonymous
e1af1b0b51
fix issue 16090 - popFront generates out-of-bounds array index on corrupted utf-8 strings
2016-05-31 17:50:44 +02:00
Sebastian Wilzbach
1d34a121e9
apply all-man braces in Phobos
...
// find common cases
sed -E "s/^(\s*)((if|static if|for|foreach|foreach_reverse|while|unittest|switch|else|version).*)\s*\{$/\1\2\n\1{/" -i **/*.d
// catch else-if
sed -E "s/^(\s*)} (else static if| if|else if|else)(.*)\s*\{$/\1}\n\1\2\3\n\1{/" -i **/*.d
// remove created trailing whitespace
sed -i 's/[ \t]*$//' **/*.d
2016-05-31 13:07:53 +02:00
Sebastian Wilzbach
2dfbc51f17
Standardize whitespace after imports
...
Unified with:
sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
Sebastian Wilzbach
59431712ce
remove placeholder copyright
2016-05-28 19:30:26 +02:00
Sebastian Wilzbach
18b8abf60a
remove the deprecated wiki macros
2016-05-27 05:52:23 +02:00
Sebastian Wilzbach
89a2dd5f11
use mref macro instead of link2
2016-05-16 03:30:08 +03:00