Commit graph

718 commits

Author SHA1 Message Date
Johan Engelen
fd009c7434
Expand topN testcase
Passing the comparison operation as string "a < b" is tested a few lines up. This adds a test for passing a lambda function.
2017-12-15 00:18:25 +01:00
Johan Engelen
acb4c7838c
Fix intentional discarding of return value in topN
This fixes a warning one gets when compiling with warnings enabled:
"phobos/std/algorithm/sorting.d(3122): Warning: calling testcase.foo.__lambda1 without side effects discards return value of type bool, prepend a cast(void) if intentional"

Testcase that fails compilation with `-w`:
```
import std.algorithm.sorting;

auto foo() {
    int[] v = [ 25, 7, 9, 2, 0, 5, 21 ];
    return topN!((a, b) => a > b)(v, 100);
}
```
2017-12-15 00:10:49 +01:00
Sebastian Wilzbach
60fba5706d
Merge pull request #5576 from wilzbach/algo-skipover
[RFC] Make std.algorithm.searching.skipOver an eponymous template to allow partial instantiation
2017-12-02 14:31:26 +01:00
Sebastian Wilzbach
2591b61b4f Start removing std.{json,zip,zlib,algorithm.mutation}
from the assert_without_msg blacklist
2017-12-01 09:28:05 +01:00
The Dlang Bot
eb3c39048a
Merge pull request #3892 from JackStouffer/mean
Add mean to std.numeric
merged-on-behalf-of: unknown
2017-11-22 05:18:03 +01:00
Jack Stouffer
b5572e8f31 Fix issue 14034: Add mean to Phobos 2017-11-21 18:23:12 -05:00
Martin Nowak
4024b1250d Merge remote-tracking branch 'upstream/stable' into merge_stable 2017-11-21 14:10:41 +01:00
The Dlang Bot
5b7ceffa05
Merge pull request #5869 from wilzbach/do-body
Replace `body` keyword with its replacement: `do`
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2017-11-20 17:20:16 +01:00
The Dlang Bot
d15447fb44
Merge pull request #5147 from wilzbach/static_if_std_algorithm_comparison
[Static if] Replace overload constraints with static if (comparison.d)
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-11-20 16:41:02 +01:00
Sebastian Wilzbach
df6365092a Replace body keyword with its replacement: do
Automatic replacement with

    sed -i "s/^\([ ]*\)body/\1do/" -i **/*.d
2017-11-20 15:33:52 +01:00
Sebastian Wilzbach
97a2c88175 Move public unittest below their respective declaration 2017-11-20 14:17:41 +01:00
Sebastian Wilzbach
171e81d689 [Static if] static_if_std_algorithm_comparison 2017-11-20 13:51:05 +01:00
MetaLang
67e853607e
More precisely define what this overload returns 2017-11-19 00:33:35 -04:00
MetaLang
dd70c998f7
Change comment as requested by Andrei 2017-11-19 00:31:13 -04:00
Sebastian Wilzbach
42236b711d Provide pred-only overload to std.algorithm.searching.findSkip 2017-11-17 17:45:46 +01:00
aG0aep6G
d2aad6b7e6
remove unintended highlighting from cache's docs
Fixes two links.
2017-11-13 23:37:45 +01:00
The Dlang Bot
4e71185e99
Merge pull request #5796 from jondegenhardt/splitter-doc-changes
Documentation improvements for std.algorithm.splitter.
merged-on-behalf-of: Jonathan M Davis <jmdavis@users.noreply.github.com>
2017-11-11 08:28:49 +01:00
Jon Degenhardt
913a0527cd Switch from dot delimiter to avoid style check involving consecutive dots. 2017-11-10 22:31:44 -08:00
Andrei Alexandrescu
334d4b9c8c
$(LREF reduce) -> $(LREF _reduce) 2017-11-06 14:27:35 -05:00
Jon Degenhardt
a184b26e8d Documentation improvements for std.algorithm.splitter. 2017-10-31 22:47:40 -07:00
Martin Nowak
a34a25ead9 fix Issue 17730 - move escapes scope variable in @safe code
- needs to be annotated with return scope, so that the return value
  lifetime depends on the argument's lifetime
- cannot be tested because phobos doesn't yet work with DIP1000 and
  also because of Issue 17932
2017-10-23 22:10:19 +02:00
Jon Degenhardt
c6ef7c3f5e Fix issue 15735: Correct splitter documentation when argument is an empty range. 2017-10-08 14:10:08 -07:00
jmh530
4150b2bb84 Update iteration.d UT comment 2017-10-03 09:42:28 -04:00
MetaLang
a9b395d503 Fix tabs 2017-10-01 22:16:41 -03:00
MetaLang
99def7bc97 Change the findSplit example into a documented unit test 2017-10-01 22:11:51 -03:00
Jon Degenhardt
30c280156c Issue 17385: Update findSplit doc so example compiles. 2017-10-01 13:49:13 -07:00
Basile Burg
722ecd878c
fix issue 12470 - std.array.replace does not work with inout(char)[] 2017-09-13 20:08:01 +02:00
RazvanN7
3a4f83577e Get rid of unused variables in std/algorithm 2017-08-02 17:30:16 +03:00
RazvanN7
30c5430181 Get rid of unused variables in std/algorithm/iteration 2017-08-02 09:21:32 +03:00
RazvanN7
dc648c5b38 Add documentation and unittests regarding multisets 2017-07-21 10:12:16 +03:00
The Dlang Bot
be29450475 Merge pull request #5628 from jmdavis/deprecations
Move some deprecations along
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-07-18 18:36:35 +02:00
Jonathan M Davis
8ef2b195f1 Move some deprecations along. 2017-07-18 06:04:40 -06:00
The Dlang Bot
739c40957c Merge pull request #5151 from wilzbach/static_if_sorting
[Static if] replace overload constraints with static if (sorting.d)
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2017-07-17 21:40:42 +02:00
The Dlang Bot
bdae5f08f3 Merge pull request #5620 from RazvanN7/Issue_6718
[WIP] Fix Issue 6718 - nWayUnion => nWayMerge, plus true nWayUnion
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2017-07-17 21:08:25 +02:00
The Dlang Bot
fedab334e8 Merge pull request #5575 from wilzbach/unify-find-step1
Unify needle overloads of std.algorithm.searching.find
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2017-07-17 20:03:31 +02:00
RazvanN7
9efa504bdc Fix Issue 6718 - nWayUnion => nWayMerge, plus true nWayUnion 2017-07-17 16:41:49 +03:00
RazvanN7
e471b222ce Rename nWayUnion => multiwayMerge and NWayUnion => MultiwayMerge 2017-07-17 15:05:10 +03:00
Sebastian Wilzbach
350300b585 Fix docs for std.algorithm.remove (avoid Ddoc auto-escape) 2017-07-11 20:02:16 +02:00
Sebastian Wilzbach
8180178986 has_public_example: std.algorithm.mutation 2017-07-09 02:28:29 +02:00
Sebastian Wilzbach
334642bbb6 has_public_example: std.algorithm.comparison 2017-07-08 23:52:27 +02:00
Sebastian Wilzbach
7fb31acf4f Add unittest for partial instantiation 2017-07-08 02:36:37 +02:00
Sebastian Wilzbach
4a2a2da607 Make std.algorithm.searching.skipOver an eponymous template 2017-07-08 02:36:27 +02:00
Sebastian Wilzbach
a6dd949717 Unify needle overloads of std.algorithm.searching.find 2017-07-08 00:24:44 +02:00
Sebastian Wilzbach
e3c91711a1 Fix random coverage in std.algorithm.sorting 2017-07-07 21:40:59 +02:00
The Dlang Bot
2317f975c9 Merge pull request #5564 from MartinNowak/fix17616
fix 17616 - makeIndex cannot fully use range of index type
merged-on-behalf-of: Steven Schveighoffer <schveiguy@users.noreply.github.com>
2017-07-07 15:14:49 +02:00
Sebastian Wilzbach
b4e1043a96 makeIndex: Remove the explicit casting from the foreach loop 2017-07-07 14:45:50 +02:00
Sebastian Wilzbach
2267cf2620 makeIndex: fix special case for uint 2017-07-07 14:37:50 +02:00
Martin Nowak
54bda1e5bc fix Issue 17616 - makeIndex cannot fully use range of index type 2017-07-07 14:13:48 +02:00
The Dlang Bot
37d15a89c5 Merge pull request #5543 from RazvanN7/Issue_17525
Fix Issue 17525 - std.algorithm.searching.skipOver should have a single argument with pred version
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-07-07 08:35:05 +02:00
RazvanN7
734641b4df Optimize count with an overload which calls walkLength 2017-07-06 22:05:20 +03:00