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
Andrei Alexandrescu
82868eaf9e
Variadic mismatch
2021-10-23 08:47:08 +00:00
Andrei Alexandrescu
f91bfff148
Update std/algorithm/comparison.d
...
Co-authored-by: Razvan Nitu <razvan.nitu1305@gmail.com>
2021-10-19 10:42:27 -04:00
Andrei Alexandrescu
43cfc832b4
Fix bug
2021-10-19 10:42:27 -04:00
Andrei Alexandrescu
e98114183c
Simpler code for length comparison
2021-10-19 10:42:27 -04:00
Andrei Alexandrescu
c21f0ea8eb
Compare all available lengths prior to entering the loop
2021-10-19 10:42:27 -04:00
Andrei Alexandrescu
963274f1c1
RFC: alternative variadic implementation of equals
2021-10-19 10:42:27 -04:00
Andrei Alexandrescu
3041b3768b
Fix Issue 22414 - clamp(a, b, c) should always return typeof(a)
2021-10-18 10:14:48 -04:00
MoonlightSentinel
3e70aac3ae
Fix 22384 - Treat noreturn handlers like void in castSwitch
...
The previous check assumed that non-`void` return implies a returned
value - which obviously does not apply for `noreturn`.
Further code then assumed that `void` handlers should throw an exception
and hence threw an error when it didn't throw.
2021-10-13 17:35:11 +02:00
Adam D. Ruppe
ff6920bd8a
Fix issue #22359 - joiner over an empty forward range object liable to segfault
...
If you pass it a range of class-based ranges, the initialization to
`typeof(_current).init` will be `null`. Calling the `save` method
on `null` will naturally be a memory violation. This generic check
will handle null without harming any other type since save of any
init value will be another init value.
2021-10-07 10:34:35 -04:00
Tobias Pankrath
30aabd8b9c
Mentions type in error message for missing opPostMove
2021-09-26 12:54:34 +00:00
Razvan Nitu
94a27083ae
Merge pull request #8246 from jrfondren/fix-20554
...
Fix issue 20554 - std.algorithm.searching.all 's static assert produc…
2021-09-22 11:11:51 +03:00
Julian Fondren
dc2bf7901f
Fix issue 20554 - std.algorithm.searching.all 's static assert produces a garbled error message
2021-09-21 20:25:26 -05:00
Julian Fondren
ea5726f9f4
std.algorithm.sorting: fix typo and related texts
2021-09-17 04:09:34 -05:00
Paul Backus
d08548e925
Fix Issue 22297 - Behavior of minElement and maxElement with empty range is undocumented
2021-09-10 17:57:46 +00:00
Johan Engelen
93ccfd21c3
Remove unused and inaccessible std.iteration.algorithm.aggregate(...)
2021-09-04 12:09:48 +00:00
Ate Eskola
eea0174127
Extra commenting on postblits, and removed needless trusted lambda
2021-08-30 16:14:53 +03:00
Ate Eskola
41355cd4e3
Partially solve issue 18161. splitWhen and chunkBy when using forward ranges is now safe
2021-08-25 22:52:40 +03:00
vladchicos
bbfe30a671
Add clarifications
2021-08-12 05:09:14 +03:00
vladchicos
cba0b3f813
Added more unittests
2021-08-12 05:09:14 +03:00
vladchicos
7a715fe687
Fix for popBack/popFront
...
popBack/popFront works for RoRs starting and/or ending with empty items
2021-08-12 05:09:14 +03:00
vladchicos
e32b635f05
Added more unittests
2021-08-12 05:09:14 +03:00
vladchicos
68dab0e2e5
Fix Issue 19727 - std.algorithm.endsWith fails to compile while startsWith succeeds.
2021-08-12 05:09:14 +03:00
Walter Bright
3301a20c16
fix Issue 22146 - std.algorithm.searching.findAdjacent() can fall off end of function
2021-07-26 14:37:43 +00:00
dkorpel
9ec24190b1
add explicit scope/return for pure functions
2021-07-11 13:34:25 +00:00
Walter Bright
ef28dede87
specialize max/min for common case ( #7499 )
...
specialize max/min for common case
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2021-07-09 13:20:43 +00:00
João Lourenço
882cf3df43
std.algorithm: improve findSplit methods module documentation
...
Signed-off-by: João Lourenço <jlourenco5691@gmail.com>
2021-06-07 12:07:47 +01:00
nordlow
5d31a68082
Break line to please maximum line length enforced by style checker
2021-05-17 12:04:06 +02:00
nordlow
6bef53dd1a
Annotate std/algorithm/searching.d to please dlang/dmd#12520 #8076
2021-05-17 00:02:04 +02:00
Nathan Sashihara
edd9007c35
Fix Issue 21724 - std.algorithm.mutation.copy fails on overlapping arrays if the source array's pointer is less than the destination array's pointer
2021-04-25 20:43:24 +08:00
Nathan Sashihara
a23fa4ed06
Fix issue #21702 - avoid quadratic template expansion in constraints of multiple search term versions of std.algorithm.searching.startsWith & endsWith
2021-04-25 20:43:24 +08:00
Nathan Sashihara
a5e0d8c17b
Remove unnecessary threeWayCompareLength from cmp
2021-04-24 04:15:53 +02:00
berni44
b2019ebab0
Narrow imports of std.math in the rest of phobos.
2021-04-21 03:00:57 +02:00
Robert Aron
d8f3d3a815
Add splitter functionality that allows to keep the sentinels
...
Signed-off-by: Robert Aron <aronrobert293@gmail.com>
Update the Return: section of DDoc
Fix whitespace
2021-04-21 00:33:22 +02:00