Commit graph

16625 commits

Author SHA1 Message Date
Razvan Nitu
afd2492e45
Merge pull request #8235 from nordlow/alias-meta-core-traits
Make allSatisfy and anySatisfy symbolic aliases to avoid extra template layer
2021-09-13 18:07:52 +08: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
Razvan Nitu
492f116174
Merge pull request #8219 from ljmf00/void-nullable-payload
std.typecons: make Nullable payload void initialized
2021-09-09 23:39:16 +08:00
Martin Nowak
f702e0d215 Merge remote-tracking branch 'upstream/stable' into merge_stable 2021-09-07 10:25:39 +02:00
Per Nordlöw
8ab7f7a043 Make allSatisfy and anySatisfy symbolic aliases to avoid extra template layer 2021-09-06 20:56:27 +02:00
Razvan Nitu
95895f2487
Merge pull request #8234 from ljmf00/file-getSize-use-ref-i
std.file: don't initialize stat struct here
2021-09-06 19:55:55 +08:00
Luís Ferreira
c047b238e3
std.file: don't initialize stat_t struct when running stat
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-09-04 20:05:44 +01:00
Johan Engelen
93ccfd21c3 Remove unused and inaccessible std.iteration.algorithm.aggregate(...) 2021-09-04 12:09:48 +00:00
Per Nordlöw
f027cbe61e Remove need for Unqual in EndianSwapper 2021-09-03 14:30:32 +00:00
Per Nordlöw
c799010b64
Make alias templates to core.internal.traits symbolic aliases to avoid extra te… (#8227)
Make alias templates to core.internal.traits symbolic aliases to avoid extra te…

Signed-off-by: Andrei Alexandrescu <andralex@users.noreply.github.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: unknown
2021-09-03 13:03:53 +00:00
Per Nordlöw
64d0dc3da1 Use version (StdUnittest) in std/meta.d 2021-09-03 12:39:41 +00:00
Razvan Nitu
fc2e3f2b1c
Merge pull request #8213 from dukc/safeChunkBy
Partially solve issue 18161 - splitWhen and most of chunkBy now @safe
2021-08-31 14:10:08 +08:00
Razvan Nitu
e67d040bc9
Merge pull request #8036 from andralex/ReplaceAll
Improve ReplaceAll
2021-08-30 21:19:41 +08:00
Razvan Nitu
cabc5421f4
Merge pull request #8040 from andralex/Filter
Use alias assignment in Filter
2021-08-30 21:19:23 +08:00
Ate Eskola
eea0174127 Extra commenting on postblits, and removed needless trusted lambda 2021-08-30 16:14:53 +03:00
The Dlang Bot
8e344f5472
Merge pull request #8218 from giacomo618/inoutJsonInOp
Make JSONValue.opBinaryRight!"in" inout 

Signed-off-by: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
Merged-on-behalf-of: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
2021-08-30 11:33:07 +00:00
Luís Ferreira
ab73d95c31 std.range: make unittests reproducible when -boundscheck=off is present
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-08-29 23:06:28 +00:00
Paul Backus
be0b04521a Fix Issue 22249 - std.experimental.checkedint: Warn.onLowerBound does not compile 2021-08-29 23:05:05 +00:00
Luís Ferreira
c36a0d3e3a std.exception: make unittests reproducible on -boundscheck=off
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-08-29 23:03:34 +00:00
Luís Ferreira
d19c437da9
std.typecons: make Nullable payload void initialized
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-08-29 18:41:47 +01:00
giacomo.ratto00
1c57bbd58f indent with spaces 2021-08-28 19:52:28 +02:00
giacomo.ratto00
66c84669c0 Make JSONValue.opBinaryRight!"in" inout 2021-08-28 19:25:28 +02:00
Razvan Nitu
5ab9ad2561
Merge pull request #8034 from andralex/NoDuplicates
Improve and simplify NoDuplicates - uses alias assignment
2021-08-27 22:15:18 +08:00
Razvan Nitu
4d58eab1ec
Merge pull request #8033 from andralex/Erase
Simplify and improve Erase and EraseAll
2021-08-27 22:09:47 +08:00
The Dlang Bot
0987031978
Merge pull request #8044 from andralex/Repeat
Use alias assignment in Repeat

Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2021-08-27 13:40:14 +00:00
Andrei Alexandrescu
8d4cd43e44 Use alias assignment in Stride 2021-08-27 12:54:16 +00:00
Andrei Alexandrescu
6544a814e6 Improve Reverse 2021-08-27 11:57:51 +00:00
Andrei Alexandrescu
b0bca9b8e1 Fix wrong decimal separators 2021-08-27 13:11:12 +03:00
Andrei Alexandrescu
b452fcbd92 Use alias assignment in Repeat 2021-08-27 13:11:12 +03:00
Andrei Alexandrescu
880c61827a On second thought, simply have DerivedToFront call staticSort 2021-08-27 13:09:18 +03:00
Andrei Alexandrescu
342b4ee90d Simpler implementation 2021-08-27 13:09:18 +03:00
Andrei Alexandrescu
cd5f2e6a9b Use mergesort for DerivedToFront 2021-08-27 13:09:18 +03:00
The Dlang Bot
a3ff6701be
Merge pull request #8217 from kubo39/doc-preExecFunction
Note that all of the code in preExecFunction must be async-signal-safe

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2021-08-26 18:44:03 +00:00
Robert burner Schadek
ba80631325 std.csv allow un equal number of value separators
By default `std.csv` will throw if there is an number of separators on a line
unequal to the number of separators of the first line.
To allow, or disallow, unequal numbers of separators a `bool` can be passed to
all overloads of the `csvReader` function as shown below.

```
string text = "76,26,22\n1,2\n3,4,5,6";
auto records = text.csvReader!int(',', '"', true);

assert(records.equal!equal([
    [76, 26, 22],
    [1, 2],
    [3, 4, 5, 6]
]));
```

working in the comments from the PR

more review changes

one more round of review fixes

there is always one left
2021-08-26 15:37:24 +00:00
Hiroki Noda
e1bb58a742 rendered in red warning 2021-08-26 22:34:51 +09:00
Hiroki Noda
1aad510fb3 Note that all of the code in preExecFunction must be async-signal-safe 2021-08-26 21:52:14 +09:00
Iain Buclaw
f9fc1f612a std.bitmanip: Add testbitarray from dmd testsuite as a unittest 2021-08-26 12:41:35 +00:00
Iain Buclaw
213660d9bd std.mmfile: Add testmmfile from dmd testsuite as a unittest 2021-08-26 12:17:32 +00:00
dkorpel
53086d4ffc remove workaround for issue 20150 2021-08-25 23:36:22 +02: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
Iain Buclaw
1cbbb845af std.math: Reference Issue 5305 in unittest taking pointer to function 2021-08-25 19:27:16 +00:00
Iain Buclaw
23c8eaa74c std.random: Add test for Issue 8671 2021-08-25 12:24:18 +00:00
Ate Eskola
c5c559343d fix issue 20937 - std.range.array of a lengthless range with indirection is not @safe 2021-08-24 23:15:08 +03:00
Razvan Nitu
12b78bdebf
Merge pull request #8208 from pbackus/fix-22117
Fix Issue 22117 - Can't store scope pointer in a SumType
2021-08-24 21:16:10 +08:00
Razvan Nitu
8631dbf92c
Merge pull request #8200 from WalterBright/hnsec
define hnsec
2021-08-24 16:46:06 +08:00
Razvan Nitu
27f37ac34a
Merge pull request #8199 from ljmf00/fix-asm-tan-impl
std.math.trigonometry: fix tan asm x86 implementation for ldc compiler
2021-08-24 16:45:20 +08:00
Paul Backus
5ac515b52c Fix Issue 22117 - Can't store scope pointer in a SumType
Previously, the assignment of the local variable 'newStorage' to the
longer-lived member variable 'storage' caused scope inference to
(correctly) fail.

newStorage was necessary to work around issues 21229 and 22118. Since
those issues have been fixed, newStorage can be safely removed.
2021-08-23 21:52:40 -04:00
Luís Ferreira
62e01fc442
std.math.trigonometry: fix tan asm x86 implementation for ldc compiler
Somehow, separating asm blocks in small pieces produces additional
`mov`s and other instructions on LDC that breaks the tanAsm logic and
therefore returns wrong values.

Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-08-21 17:29:15 +01:00
Max Haughton
6338c93423
Update std/datetime/systime.d
Co-authored-by: Luís Ferreira <contact@lsferreira.net>
2021-08-20 00:08:00 +01:00
Paul Backus
f96f8046d9 Fix Issue 22225 - SumType: Some assignments should be able to execute in safe code 2021-08-19 23:07:12 +00:00