Commit graph

222 commits

Author SHA1 Message Date
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
anonymous
641d6ff8d7 clean up remaining XREFs (manual)
Found by: grep -r '$(XREF'

std.experimental.allocator has a custom XREF2. Leaving that as is for now.
2016-05-27 21:40:46 +02:00
anonymous
ef9722928c XREF_PACK_NAMED -> REF_ALTTEXT (sed)
Done by:

arg='\s*([^(),]*)'
from='\$\(XREF_PACK_NAMED\s'$arg','$arg','$arg','$arg'\)'
to='$(REF_ALTTEXT \4, \3, std,\1,\2)'
(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r "s/$from/$to/g"
2016-05-27 21:32:46 +02:00
anonymous
d648f9320e XREF_PACK -> REF (sed)
Done by:

from='\$\(XREF_PACK\s+([^(),]*),\s*([^(),]*),\s*([^(),]*)\)'
to='$(REF \3, std,\1,\2)'
(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r "s/$from/$to/g"
2016-05-27 21:32:46 +02:00
anonymous
764caefa36 XREF -> REF (sed)
Done by:

(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r \
    's/\$\(XREF\s+([^(),]*),\s*([^(),]*)\)/$(REF \2, std,\1)/g'
2016-05-27 21:32:46 +02:00
Sebastian Wilzbach
614294cd70 remove whitespace in ddoc output of std/algorithm 2016-05-25 03:57:01 +02:00
Vladimir Panteleev
38a6370788 Merge pull request #4303 from wilzbach/mref_phobos
use mref macro instead of link2
2016-05-24 03:12:08 +03:00
Sebastian Wilzbach
89a2dd5f11 use mref macro instead of link2 2016-05-16 03:30:08 +03:00
Sebastian Wilzbach
b8f17e2531 std.algorithms: document public methods 2016-05-12 17:53:03 +03:00
Jack Stouffer
3890f5d804 Fixed long lines in std/algorithm/iteration.d 2016-05-10 20:51:39 -04:00
Ryan Roden-Corrent
ed03b22bc0 Support multi-arg opApply/range for each.
std.algorithm.iteration.each can now be called with a lambda taking >2
args. This should work for any input range that returns a tuple and any
type with a non-templated opApply that takes a multi-arg delegate.

Determining the arity of a templated opApply still poses a problem, so
that case is not supported.

This also adds support for `each` with two ref args.

When given a binary function that takes two args by ref,
std.algorithm.iteration.each should use both args by ref.

It was previously discarding ref on the first arg, assuming it was for
an index.

Resolves #15358.
2016-05-08 07:22:48 -04:00
Dragos Carp
984fbb487d Address review comments 2016-04-27 22:12:33 +02:00
Dragos Carp
5a9cedf1bd Add std.algorithm.iteration.cumulativeFold 2016-04-27 22:12:32 +02:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
Brian Schott
edbb7a1537 Merge pull request #4030 from dcarp/issue15735
Fix issue 15735
2016-04-25 18:21:16 -07:00
Dmitry Olshansky
1d2e88c266 Merge pull request #4069 from John-Colvin/patch-16
faster pairwise summation
2016-04-12 13:17:18 +04:00
Jack Stouffer
12c17d4fd0 Cleaned up std.algorithm.joiner's docs 2016-04-11 22:38:35 -04:00
Dragos Carp
b438bf5a06 Fix issue 15735 2016-04-11 20:58:23 +02:00
Ilya Yaroshenko
d4fa64bb42 fix index types to size_t 2016-04-10 12:46:51 +02:00
John Colvin
678a511ff2 faster pairwise summation 2016-03-24 13:14:42 +00:00
Brian Schott
f63523b1a8 Merge pull request #4065 from tsbockman/pr3969_fixup
Fixup for PR#3969
2016-03-18 16:58:13 -07:00
tsbockman
6c8333627c Fix map() to work with multi-module overload sets.
Verify return values for multiple lambda unittest.
2016-03-07 12:48:06 -08:00
Atila Neves
9cc2a5ae59 Replace 'reduce' with 'fold' in the documentation 2016-03-05 18:50:11 +01:00
Atila Neves
5d0ff1e1e5 Introduce "fold" as an alternative to "reduce" 2016-02-26 18:36:34 +01:00
H. S. Teoh
5bb30cc23c Fix broken links and missing ddoc identifier escapes. 2016-02-15 08:08:35 -08:00
Basile Burg
c871ab44cc fixed issue 15683 2016-02-15 06:08:07 +01:00
tsbockman
b23608b635 Fix Phobos issue 15480 2016-02-04 12:01:36 -08:00
Andrei Alexandrescu
731e47e242 Merge pull request #3800 from JackStouffer/lambda
Removed string predicates from std.algorithm.iteration documentation
2016-01-15 20:32:40 -05:00
Andrei Alexandrescu
47259a4267 Merge pull request #3923 from JakobOvrum/tls_in_reduce
Remove TLS variables from ReduceSeedType
2016-01-12 00:30:00 -05:00
Jakob Øvrum
c06c1e5a17 Remove TLS variables from ReduceSeedType 2016-01-12 12:40:23 +09:00
Jakob Øvrum
79ac418680 Mention "flatten" in docs for std.algorithm.iteration.joiner 2016-01-08 02:41:17 +01:00
Jonathan M Davis
0899d9403f Move deprecations along.
This includes deprecating std.c.*, which apparently was marked as
scheduled for deprecation in 2.068 but never actually deprecated (though
it looks like it was previously removed from the documentation build,
since it doesn't show up on dlang.org).
2015-12-30 00:18:53 -08:00
Jack Stouffer
a1b9d5dd1a removed string preds from std.algorithm.iteration 2015-12-02 15:44:56 -05:00
Vladimir Panteleev
e90be60a67 Merge pull request #3839 from aG0aep6G/ddlink
use DDLINK/DDSUBLINK instead of LINK2 and raw HTML
2015-11-27 04:54:52 +02:00
Jonathan M Davis
7afe668428 Merge pull request #3807 from dcarp/Fix15320
[Issue 15320] eliminate 'static assert(__traits(compiles,..'
2015-11-26 17:57:44 -08:00
anonymous
6832caf0be use DDLINK/DDSUBLINK instead of LINK2 and raw HTML
DDLINK/DDSUBLINK use ROOT_DIR which is more robust than a relative path.
2015-11-26 16:04:44 +01:00
anonymous
1c8467c676 update links to spec pages 2015-11-24 17:58:49 +01: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
Brian Schott
67c95e6de2 Merge pull request #3715 from dcarp/AliasSeq
Rename obsolete TypeTuple to AliasSeq
2015-10-16 20:59:56 -07:00
H. S. Teoh
758e6f2f9e Merge pull request #3723 from CyberShadow/pull-20151015-184625
fix Issue 15133 - Error message is incomprehensible
2015-10-15 12:28:29 -07:00
Vladimir Panteleev
91b34d9c70 fix Issue 15133 - Error message is incomprehensible 2015-10-15 18:46:36 +00: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
8d9d606ef8 Merge pull request #3700 from CyberShadow/pull-20151007-105521
Use canonical links to forum.dlang.org
2015-10-07 16:01:04 +02:00
Vladimir Panteleev
52d6930daf Use canonical links to forum.dlang.org
http://forum.dlang.org/help#canonical
2015-10-07 10:55:51 +00:00
Jack Stouffer
3706811991 fixed docs 2015-10-05 09:16:19 -04:00
Martin Nowak
18c5b270e0 Merge remote-tracking branch 'upstream/stable' into merge_stable
Conflicts:
	std/internal/cstring.d
	win64.mak
2015-09-07 00:44:29 +02:00
Dmitry Olshansky
09d5b511f4 Merge pull request #3528 from vladdeSV/format-return-correct-type
format() returns the correct type
2015-08-30 22:57:57 +03:00
k-hara
6579c574bb fix Issue 14904 - bad error message in reduce: 'Incompatible function/seed/element'
The verbose message is shown only when the given `fun` is actually valid.
2015-08-25 13:38:24 +09:00