Commit graph

16405 commits

Author SHA1 Message Date
Dennis Korpel
08b6dd3f7a Fix bugzilla 24478 - std.csv array out of bounds when row size exceeds header 2024-04-02 21:28:26 +02:00
Dennis Korpel
8729740e32 Mark endianToNativeImpl @trusted 2024-04-02 17:16:37 +08:00
Iain Buclaw
045b632950 Merge remote-tracking branch 'upstream/stable' into merge_stable 2024-04-01 20:59:13 +00:00
Jonathan M Davis
7858069343 Fix bugzilla #24465: Make Tuple work with copy constructors
If there's a constructor that looks like a copy constructor except that
it takes an rvalue instead of taking the argument by ref, then that type
can't have a copy constructor, and one of Tuple's constructors was
causing that problem. So, this fixes it so that it doesn't.
2024-04-01 20:15:25 +02:00
Johan Engelen
9f735fd8bf Fix alignment of buffers in kernighan_ritchie unittests. 2024-04-01 20:15:04 +02:00
Nick Treleaven
14b23633b7 [std.traits] Improve FunctionTypeOf docs 2024-04-01 05:52:13 +08:00
MrcSnm
4d332baad1 Fix Bugzilla Issue 24458 - Mac M3 associative array keys on std.net.curl gets overwritten 2024-03-31 15:57:18 -03:00
MrcSnm
afb0b3485b Fix Bugzilla Issue 24458 - Mac M3 associative array keys on std.net.curl gets overwritten 2024-03-30 08:47:50 -03:00
liushuyu
676710c7b8 std/math/hardware.d: use an alternative register naming ...
... for LoongArch64 so that LDC/LLVM can recognize certain fp
instructions
2024-03-23 23:38:07 +01:00
Horodniceanu Andrei
b2853536e9
std/file.d: Don't check for OS-dependent error message in unittest
Signed-off-by: Horodniceanu Andrei <a.horodniceanu@proton.me>
2024-03-22 09:18:42 +02:00
Walter Bright
41716f8f45
Merge pull request #8950 from WalterBright/swapAndDestroy
swap-and-destroy called too eagerly
2024-03-19 22:48:34 -07:00
Dennis Korpel
f6b2932268 Remove explicit hex string casts 2024-03-19 23:48:15 +01:00
Walter Bright
1591ce9fe7 swap-and-destroy called too eagerly 2024-03-18 09:24:00 -07:00
Nick Treleaven
03c368158e [std.socket] Fix cast assign to getaddrinfoPointer
See https://github.com/dlang/dmd/pull/16315

With that pull, using a type qualifier cast is not @safe to use as an
lvalue.
2024-03-16 22:52:59 +01:00
Dennis
9a42fa1a53
Merge pull request #8941 from ntrel/count-doc
[std.algorithm.searching] Improve `count` docs
2024-03-15 23:39:19 +01:00
Nick Treleaven
0b45fc77c6 Fix pred description when there's no needle 2024-03-13 11:26:58 +00:00
Nick Treleaven
4ea7dd3e07 Add short descriptions for each overload set; minor tweaks
Short descriptions improve ddox output.
Use overload instead of version.
2024-03-13 11:26:50 +00:00
Nick Treleaven
e695747422 Update cheat sheet description 2024-03-13 11:19:06 +00:00
Walter Bright
6fa90fe18e
Merge pull request #8944 from WalterBright/unqualCast2
utf.d replace use of Unqual with cast()
2024-03-09 16:52:18 -08:00
Walter Bright
046f56d58d
Merge pull request #8943 from WalterBright/unqualCast
use cast() where we can
2024-03-09 16:52:09 -08:00
Walter Bright
2759bc800a utf.d replace use of Unqual with cast() 2024-03-08 13:44:04 -08:00
Walter Bright
a44abe9167 use cast() where we can 2024-03-08 11:57:50 -08:00
Nick Treleaven
ac6c03a646 [std.algorithm.searching] Improve count docs
Fix `value` missing reference.
Tweak wording.
Explain `pred` better.
Separate out needle overloads from the other 2.
Fix 'Returns'.
Split example into 2.
2024-03-08 16:10:59 +00:00
Vladimir Panteleev
04b1563ef1 std.path: Note that absolutePath and co. do not collapse ".." 2024-03-04 15:34:07 +08:00
Paul Backus
837b7deb7d std.range.choose: call payload postblit correctly
Fixes bugzilla issue 15708
2024-03-04 00:43:59 +01:00
Paul Backus
bfe2a18389 sumtype: add hint to "never matches" message
A common cause of the "handler never matches" error is a template
handler that contains a typo or other compile-time error. Since the
location of the actual error is suppressed by __traits(compiles), users
often do not think to look for a mistake inside the handler itself. Now,
the message itself includes a hint to do so.
2024-03-03 05:37:21 +01:00
Jonathan M Davis
115b7f61a9 fix Bugzilla Issue 24403 - Nullable doesn't work with non-mutable types with a destructor
This should make it so that a variable of type Nullable!T has the same
behavior with regards to destruction as a variable of type T even when
it's const, immutable, or shared.
2024-02-21 19:06:29 +08:00
Paul Backus
5478868465 Document range capabilities of only() result 2024-02-16 07:06:31 +08:00
Paul Backus
54a4afae9c
Merge pull request #8912 from ntrel/mut-remove
[std.algorithm.mutation] Improve `remove` docs
2024-02-15 08:59:06 -05:00
Paul Backus
82da4f114d Allow assignment of std.range.only elements
This allows the ranges returned by only to be used in algorithms that
require assignable elements, such as reverse, sort, and transposed.

Fixes bugzilla issue 24382.
2024-02-14 23:15:18 +01:00
Paul Backus
bbbdfd5287
Merge pull request #8911 from pbackus/fix-24384
Skip leading empty ranges in roundRobin
2024-02-14 11:31:28 -05:00
Walter Bright
42b8c65ccf CheckBy postblit should be scope 2024-02-12 09:24:07 +01:00
Paul Backus
720ac51ea1 Skip leading empty ranges in roundRobin
Previously, roundRobin would always attempt to fetch its first element
from the first range passed to it, even if that range was empty.

Fixes bugzilla issue 24384.
2024-02-10 11:47:38 -05:00
Nick Treleaven
ca9561b389 [std.algorithm.mutation] Improve remove docs
Make examples runnable.
Add 2 subheadings.
Minor tweaks.
Fix throwing example of tuple offset.
2024-02-10 12:34:45 +00:00
Dennis
f3ec8b767d
std.uni: replace dstring case table with uint[] hexstring (#8904) 2024-01-31 12:27:28 +02:00
Iain Buclaw
489b43a013 Merge remote-tracking branch 'upstream/stable' into merge_stable 2024-01-28 00:18:02 +00:00
Dennis Korpel
0cd85c7093 std.uni: use hex strings for TrieEntry 2024-01-26 23:30:51 +01:00
Dennis
ae9f9307d3
Merge pull request #8903 from dkorpel/unicode-case-hexstrings
std.uni: use hex strings for case entries
2024-01-25 11:48:08 +01:00
Ogi-kun
6d6e0b9b9f
Fix std.bitmanip.bitfields documentation (#8902)
Fix std.bitmanip.bitfields documentation

Signed-off-by: Dennis <dkorpel@users.noreply.github.com>
Merged-on-behalf-of: Dennis <dkorpel@users.noreply.github.com>
2024-01-25 11:47:13 +01:00
Dennis Korpel
e87bab2da2 std.uni: use hex strings for case entries 2024-01-25 10:32:13 +01:00
Atila Neves
64457e8938
Merge pull request #8897 from pbackus/range-element-type
Add optional element type to remaining range predicates
2024-01-22 09:32:50 +01:00
Paul Backus
c4391b2237 Update docs for hasSlicing with inifnite range
The requirement for opSlice on an infinite range to return the result of
take or takeExactly was removed in commit c828a08b64, which was included
in Phobos 2.067.0, released in March 2015. However, the documentation
was never updated to take this change into account.

This change updates the documentation and adds a unit test for the "new"
behavior.

Fixes bugzilla issue 24348.
2024-01-21 00:53:08 +01:00
Paul Backus
c0557d30dc Add optional element type to isRandomAccessRange 2024-01-20 10:42:33 -05:00
Paul Backus
9f8de2b568 Add optional element type to isBidirectionalRange 2024-01-20 10:33:44 -05:00
Paul Backus
68c412316b Document element type parameter for isForwardRange 2024-01-20 10:22:42 -05:00
Mathis Beer
5976fe8c1a Fix Bugzilla issue 24342: Actually check that range and sentinel types match in until before using "sentinel as subrange" mode.
`until` does special magic when `Sentinel` consists of multiple elements of `Range`. However, because `Range` can be a range of ranges, in which case even a `Sentinel` that is a range may still only be a single element, we must confirm that the element type of `Sentinel` is actually the same as `Range` before enabling this.
The `immutable ElementEncodingType` idiom is stolen from `startsWith`, which forms the basis of `until` anyways (see `predSatisfied`).
2024-01-18 14:56:52 +08:00
Iain Buclaw
c6e1f98fab std.math.hardware: Remove mixin around RISCV implementations 2024-01-18 00:44:26 +01:00
Dennis Korpel
94890e03dc Fix std.mmap documentation 2024-01-16 17:59:49 +01:00
Dennis Korpel
fc804bb8da Fix 24339 - std.mmfile has poor documentation 2024-01-14 13:20:01 +01:00
Dennis
fa7f22b2cf
std.uni: Use dstring for dchar tables (#8889)
* std.uni: use dstring for upper/lower/title tables

* std.uni: make tables use dstring

* Add space after cast for Dscanner

* Remove redundant semicolons
2024-01-10 17:48:25 +02:00