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
Bernhard Seckinger
9cb7755041
Replace approxEqual with isClose
2021-01-28 10:39:50 +01:00
Andrei Alexandrescu
311f00f8ac
Merge pull request #7632 from andralex/minmax
...
Simplify min and max
2020-09-19 16:19:07 -04:00
Andrei Alexandrescu
620a5a042d
Push useCodePoint all the way in
2020-09-18 10:43:27 -04:00
Andrei Alexandrescu
e048dbeb18
Review
2020-09-18 10:43:27 -04:00
Andrei Alexandrescu
369ed6edb6
No need for isEmptyRange
2020-09-18 10:42:03 -04:00
Andrei Alexandrescu
890cd7e8b7
A few more minor improvements to std.algorithm.comparison: pushed implementation constraint down, undocument superfluous flag name, allow comparison of lengths involving infinite ranges, simplify implementation of isSameLength
2020-09-18 10:42:03 -04:00
Andrei Alexandrescu
cae6379750
Fix Issue 21249 - clamp() is not stable and is not constrained
2020-09-16 01:20:51 +02:00
Andrei Alexandrescu
639bedbea8
Fix min
2020-09-13 17:25:20 -04:00
Andrei Alexandrescu
43c95c46d8
Improve type computation - a type that defines max could mess things up
2020-09-13 16:43:42 -04:00
Andrei Alexandrescu
423f633fd7
Simplify min and max
2020-09-13 10:47:18 -04:00
Andrei Alexandrescu
6194b17295
Fix Issue 21191 - min should be stable: when in doubt, return the first argument
2020-08-28 08:19:40 +02:00
Steven Schveighoffer
17ae8fc9be
Make it so std.utf can be tested with no autodecoding.
2020-08-17 06:53:34 +02:00
Nathan Sashihara
453faadf5b
Replace is(Unqual!T == Unqual!U) with is(immutable T == immutable U) for speed & memory usage
2020-08-03 15:07:32 +02:00
Geod24
04f3979317
Replace 'Issue XXX' with Bugzilla links
...
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Atila Neves
69ae443df4
Replace .staticArray with explicit declarations
2020-03-19 16:18:53 +01:00
Atila Neves
825b72dc88
Restore changes to among
unittest that fails on Windows
2020-03-19 15:03:20 +01:00
Atila Neves
9a6f9543cf
Address style violations
2020-03-18 18:02:01 +01:00
Atila Neves
bdacde79c3
Add @nogc to all relevant unittests in comparison.d
2020-03-18 18:02:01 +01:00
Bernhard Seckinger
0320d88c3a
Fix Issue 10448 - min and max are not NaN aware
2019-10-21 11:40:09 +02:00
David Gileadi
775bcdee51
Turn on -preview=markdown
2019-07-04 10:28:30 -07:00
Robert Schadek
ef71418e73
Adds assert messages
2019-06-25 09:16:27 +01:00
Sebastian Wilzbach
12c5e1ee91
Use selective top-level module imports in std.algorithm
2019-05-23 10:21:19 +02:00
Nathan Sashihara
7bfb207376
Fix Issue 19412 - std.algorithm.cmp with default ordering can use memcmp for all size 1 unsigned types
...
... instead of just char.
2019-03-08 19:52:21 -05:00
Vasniktel
8356511ffb
Fixed comparison bug ( #6888 )
...
Fixed comparison bug
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-03-08 12:50:24 +01:00
Manu Evans
3ac8804df1
min/max shouldn't pull std.format
2018-12-10 01:03:28 -08:00
Sebastian Wilzbach
57d12560c5
Start to add @betterC to std.algorithm.comparison
2018-08-21 17:19:21 +02:00
Sebastian Wilzbach
c324714fde
Remove a few cases of underscore escaping
2018-06-04 13:05:01 +02:00
Sebastian Wilzbach
d9830b739e
Fix DScanner warnings
2018-02-10 22:46:32 +01:00
Sebastian Wilzbach
7fb3d4249f
Remove references to STL
2018-01-30 16:08:20 +01:00
Nathan Sashihara
7f59e5ad52
Fix Issue 18280 - std.algorithm.comparison.cmp for non-strings should call opCmp only once per item pair
...
split cmp into two overloads per @andralex
https://github.com/dlang/phobos/pull/6056#pullrequestreview-90687092
Minor adjustments, again
cmp should return auto and let opCmp drive
https://github.com/dlang/phobos/pull/6056#issuecomment-359665184
Fix Issue 18285 - std.algorithm.comparison.cmp for strings with custom predicate compares lengths wrong
Test std.algorithm.comparison.cmp when opCmp returns float
Promotions should not use cast
Optimize cmp's endgame
There are some redundant tests when the end of the ranges is reached. Eliminated that, and improved threeWayByPred.
Fix Issue 18286 - std.algorithm.comparison.cmp for string with custom predicate fails if distinct chars can compare equal
Fix Issue 18288 - std.algorithm.comparison.cmp for wide strings should be @safe
re-apply remove cast in promotions
2018-01-23 19:54:58 -05:00
Sebastian Wilzbach
fc0c29f3a2
Markdownify std.algorithm
...
Done with: https://github.com/wilzbach/dscanner-fix/blob/master/d_code_markdown.d
2017-12-29 01:17:40 +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
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
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
171e81d689
[Static if] static_if_std_algorithm_comparison
2017-11-20 13:51:05 +01:00
Sebastian Wilzbach
334642bbb6
has_public_example: std.algorithm.comparison
2017-07-08 23:52:27 +02:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
...
This reverts commit 998ad51fd7
.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
998ad51fd7
Sort selective imports
2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d
Sort imports
2017-06-12 07:54:38 +02:00
Jack Stouffer
b5ffc889ca
Remove debug writelns
2017-06-01 11:13:04 -04:00
The Dlang Bot
8146e88326
Merge pull request #5210 from wilzbach/std-algorithm-disable-quick-index
...
std.algorithm: remove quickIndex, fix outdated book tables & HTML links
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-03-03 15:35:24 +01:00
Sebastian Wilzbach
b3bf38e6d6
std.algorithm: remove quickIndex, fix outdated book tables & HTML links
2017-03-01 03:59:48 +01:00
Sebastian Wilzbach
d548e8830a
Replace LUCKY links with actual links
2017-02-28 23:46:54 +01:00
Jack Stouffer
f2b5834172
Linked to the definition of forward and bidirectional ranges where they're mentioned in std.algorithm
2017-02-26 11:44:55 -05:00
Jack Stouffer
7d4ac19030
Linked to the definition of input ranges where they're mentioned
2017-02-25 19:18:54 -05: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
805c720595
Unify Phobos by ensuring there's always a space after cast(...)
...
Command:
sed -E 's/([^"])cast\(([^)]*?)\)([[:alnum:]])/\1cast(\2) \3/g' -i **/*.d
2017-02-21 16:40:20 +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