Commit graph

109 commits

Author SHA1 Message Date
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
Jack Stouffer
82b1c0e097 Fixed long lines in std/range/primitives.d 2016-05-10 20:51:39 -04:00
Nick Treleaven
58b1f7a03e Document narrow string front, back
Also make back not compile when T is void, as front does.
2016-05-04 12:23:12 +01:00
Sebastian Wilzbach
d1714c9afb minor style fixes 2016-04-27 04:18:22 +03:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
Nick Treleaven
0fff9203f8 [trivial] Tweak moveFront example 2016-04-18 13:44:15 +01:00
Yazan Dabain
9887af3fe6 Fix some imports 2016-04-12 22:15:09 +03:00
Ilya Yaroshenko
3884b9d13a clean API for moveAt 2016-04-10 12:46:55 +02:00
Ilya Yaroshenko
ff296c514b fix imports 2016-04-07 13:25:18 +02:00
Steven Schveighoffer
b0acb7a394 Fix remaining import deprecation messages 2016-02-22 16:03:12 -05:00
Dragos Carp
75cbbef0ab Add asserts for the "compiles" tests 2015-11-16 03:04:07 +01:00
Dragos Carp
eb293b5063 Fix issue 15320 2015-11-13 03:45:29 +01:00
Dragos Carp
d698887729 Remove obsolete TypeTuple references
Replace following names:
std.typetuple      -> std.meta
TypeTuple          -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple     -> Fields

std.traits requires more work than search/replace and is left unchanged.
2015-10-13 20:37:44 +02:00
Martin Nowak
b861b0fe71 fix spelling in doPut error message 2015-10-03 21:46:57 +02:00
k-hara
6813eca0d2 fix Issue 15046 - isForwardRange documentation is documenting issue 14544 2015-09-12 20:14:29 +09:00
Steven Schveighoffer
c353c4ae7f Fix more typeof expressions that were missed 2015-06-05 16:50:33 -04:00
Steven Schveighoffer
ad1eefffae Fix inconsistency issues where some range properties are required to have @property because of quirk in typeof for member functions. 2015-06-05 16:50:33 -04:00
Walter Bright
d9a9826e55 Revert "Introducing std.meta package" 2015-05-06 14:36:45 -07:00
Dicebot
82f54a38d3 TypeTuple -> MetaList inside Phobos 2015-05-05 22:22:11 +03:00
Dicebot
73f773838d import std.typetuple -> import std.meta 2015-05-05 22:22:10 +03:00
Dragos Carp
b170d93693 Fix some PHOBOSSRC broken links 2015-04-29 11:02:58 +02:00
anonymous
0842fc7841 @nogc for std.range.primitives.{empty,save,popFront,popBack,front,back}
Excluding the UTF-decoding variants, because those throw GC allocated
exceptions.

Makes sure that issue 12666 - "@nogc std.array.front, popFront, and more"
stays fixed.
2015-04-23 22:15:41 +02:00
Walter Bright
a0f0a3930d improve doc for std.range.primitives.isInputRange 2015-03-29 00:46:47 -07:00