Commit graph

918 commits

Author SHA1 Message Date
Iain Buclaw
faca94c214 Fix broken tests caused by merge conflicts 2023-07-15 14:15:20 +00:00
Iain Buclaw
ab307c9acf Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-07-15 13:49:21 +00:00
FeepingCreature
dfcbee7056 Fix issue 24027: Instead of a bunch of special-cases, just check that Rebindable did in fact alias itself away.
This looks ugly, but it's just for the `stable` branch - this is fixed on `master` via the `Rebindable2` rewrite https://github.com/dlang/phobos/pull/8768
2023-07-04 01:31:32 +02:00
Iain Buclaw
a3526d11dd Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-07-02 02:10:20 +00:00
Mathis Beer
10601cc046 Add std.typecons.Rebindable2 for internal use.
Rebindable2 is a simplified version of std.typecons.Rebindable that clears up every special case: classes, arrays and structs now have the same struct.
Whichever type you instantiate `Rebindable2` with, you always get the same type out by calling `value.get` on the resulting container.
Also use this type to simplify the parts of Phobos we previously used `Rebindable` for.
2023-06-19 13:24:30 +02:00
Dennis
5cd77a6e32
User hyperlinks to refer to bugzilla issues (#8766) 2023-06-16 14:45:44 +03:00
FeepingCreature
f715941036 Fix issue 23993: Discard Rebindable before passing extremum to comparator. 2023-06-15 19:06:27 +02:00
Robert burner Schadek
e1f7edae57 Better std.algorithm.iteration.permutations error messages 2023-05-26 05:45:32 +02:00
Mathis Beer
2f6b2efaf7 Change struct Rebindable to just use cast() if this is sufficient.
This works better at compiletime.
2023-04-19 22:59:43 +00:00
Mathis Beer
b818901e63 Fix issue 22786 (immutable element in maxElement) by always using Rebindable. 2023-04-19 22:59:43 +00:00
FeepingCreature
656ae7905e
Fix issue 22785: joiner should Unqual child ranges. (#8737)
* Fix issue 22785: `joiner` should `Unqual` child ranges.
This allows use with `immutable T[][]` and similar.

---------

Co-authored-by: Petar Kirov <petar.p.kirov@gmail.com>
2023-04-20 01:59:19 +03:00
Nick Treleaven
01a12f919e
[std.algorithm.searching] Don't instantiate template pred in all and any constraints (#8715)
Fixes Issue 23769 - Lambda isn't a unary predicate for lambda that
doesn't compile.
2023-04-10 19:10:18 +03:00
Nick Treleaven
72da991685
[std.algorithm.searching] Fix 2 typos in docs (#8728) 2023-03-31 15:38:47 +03:00
Robert burner Schadek
d8c627e037 Better std.algorithm.comparison.clamp error messages 2023-03-15 16:53:20 +01:00
Robert burner Schadek
8546da5b04 Better std.algorithm.iteration.filter error messages 2023-02-21 10:17:22 +01:00
Ikey Doherty
ac8318c5ad
algorithm/sorting: Fix typo introduced in PR #8678
Typo specifically introduced in:

 - baaa1117de

Signed-off-by: Ikey Doherty <ikey@serpentos.com>
2023-02-18 14:33:49 +00:00
Robert burner Schadek
ef2eb4fdb7 Better Sort static assert error messages 2023-02-13 21:14:34 +01:00
Iain Buclaw
6d7b83d49c Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-02-13 01:30:01 +00:00
Mathis Beer
c06e3171f1 Fix issue 23668: TimSort must avoid default initialization if the type being sorted has it disabled. 2023-02-04 09:51:27 +01:00
DanutAldea
cce4c938dd Fix Issue 20397 2023-02-01 00:44:25 +01:00
H. S. Teoh
08be61029e Clarify that .uniq by default expects a sorted range. 2022-12-09 03:18:46 +01:00
Paul Backus
792c8b7c1d Fix typo in doc for std.algorithm.mutation.fill 2022-12-06 19:52:21 +01:00
Lucian Danescu
322fed7bf7 add local imports 2022-11-12 19:29:28 +02:00
Nick Treleaven
281f42d306
Fix missing unittests in docs (#8603)
* Fix missing staticArray unittest in docs

Found using https://github.com/dlang/dmd/pull/14527.

* Fix missing FloatRep and DoubleRep unittests in docs

* 2 JSONValue op overloads

* std.random

* detabber

* remove

* std.digest.murmurhash
2022-10-17 05:43:13 +08:00
The Dlang Bot
b026e490c4
Merge pull request #8580 from jamesragray/b18975
Make permutations into forward range.

Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Signed-off-by: H. S. Teoh <quickfur@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2022-09-27 01:05:31 +02:00
james
872bb2cdb4 Fixed a typo in comment. 2022-09-26 22:49:44 +02:00
Razvan Nitu
88aa69b14f
Merge pull request #8570 from jamesragray/untilsimplerfix
Fix issue 14543: std.algorithm.searching.until does n…
2022-09-26 05:56:49 +03:00
james
8744064c6f Fix issue 23362: Permutations should be a forward range. 2022-09-23 22:39:15 +02:00
Dennis Korpel
2866acf18d Fix @system annotation in multisort unittest 2022-09-23 17:11:42 +02:00
james
bc5126469e Fix Issue 14542 - std.algorithm.searching.until does not handle range sentinels nicely 2022-09-23 16:44:42 +02:00
james
cd42a6a81f Style fixes. 2022-09-21 23:10:20 +02:00
james
370f14af6d Make permutations into forward range. 2022-09-21 23:00:20 +02:00
james
d2b8a15e69 Added unittest related to fix, and moved unittest related to issue to std/algorithm/iterartion.d 2022-09-19 22:27:22 +02:00
RazvanN7
7990916723 Fix Issue 23268 - clamp no longer accepts shorts 2022-08-31 11:10:51 +02:00
Walter Bright
cf3f60c359 iteration: use static class 2022-08-18 11:27:21 -07:00
Adam D. Ruppe
8ed1c4095a wrong example - the paren char args are required 2022-08-01 10:08:24 +00:00
Paul Backus
4d0e74ba1c
std.algorithm: improve documentation of filter (#8514)
std.algorithm: improve documentation of filter

Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Petar Kirov <PetarKirov@users.noreply.github.com>
2022-07-24 20:19:21 +00:00
Iulia Dumitru
d0c52225b4 Fix issue 18735 all versions of find and canfind should identify usage of predicate 2022-07-24 02:55:44 +00:00
Tomáš Chaloupka
9ac9d359ac Fix 23132 - Avoid ranges copy when compared for equality 2022-06-21 15:09:48 +00:00
Dennis Korpel
3d8b95791f Fix return scope in cartesianProduct Result.save 2022-03-09 15:37:09 +00:00
Paul Backus
ab4008c13f Add explanatory comment to addressOf 2022-02-07 16:29:58 +00:00
wolframw
dc697c8dd8 Fix Issue 22105 - std.container.array.Array.length setter creates values of init-less types 2021-12-28 23:33:31 +00:00
wolframw
ef9ed4fa19 Fix link in documentation 2021-12-25 03:32:26 +00:00
João Lourenço
f25b3fc78e
Issue 22582 - [std.algorithm.count] predicate does not implicitly convert to bool (#8330)
Issue 22582 - [std.algorithm.count] predicate does not implicitly convert to bool

Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2021-12-10 15:16:45 +00:00
Stanislav Blinov
12329adb67 schwartzSort to use pureMalloc so it's more pure
That way it's only impure for transformations that yield
indirections, and that's because (de-)registering memory
ranges with GC is impure.
2021-12-09 07:27:56 +00:00
Mathis Beer
0a228d72a8 Fix issue 22561: Allow joiner to reassign range values that contain immutable fields. 2021-12-03 14:10:32 +01:00
Martin Kinkelin
62780daf85 Prefer __traits(initSymbol) over TypeInfo.initializer() 2021-11-17 05:12:47 +00:00
RazvanN7
6f5b2d6b60 Document how the returned value of clamp is converted to the return type 2021-10-26 16:07:27 +03:00
Andrei Alexandrescu
fb55df97e4 Add unittests 2021-10-25 17:28:19 -06:00
Andrei Alexandrescu
0efda76c67 Variadic isSameLength 2021-10-25 17:19:50 -06:00