Commit graph

16625 commits

Author SHA1 Message Date
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
Dennis
13816d78f3
Reduce imports needed to print floats (#8890) 2024-01-10 17:46:22 +02:00
Dennis Korpel
af132bedb1 std.regex: put disassemble function in debug version 2024-01-10 00:32:27 +01:00
Dennis Korpel
2bb54df391 Move floatTraits to std.math.traits 2024-01-09 13:00:50 +01:00
Dennis Korpel
135e9ad193 std.uni: optimize simpleCaseTable
Cuts size of simpleCaseTable entries in half (8 -> 4 bytes), reducing table size from 24 Kb to 12 Kb.
Still only 22 out of 32 bits per entry are actually used, so could be optimized further.
Using plain integers saves 10 ms semantic2 compile time.
2024-01-09 12:02:12 +01:00
Dennis Korpel
90715f3b07 std.uni: use dstring for compositionTable 2024-01-08 23:37:44 +01:00
Dennis Korpel
bdbce3b67d Use static array for table 2024-01-08 00:02:21 +01:00
Dennis Korpel
bd8b943fa2 std.uni: optimize fullCaseTable 2024-01-07 11:35:29 +01:00
Dennis
3d2b63489f
Merge pull request #8881 from dkorpel/unicode-hexstrings
std.uni: use hexstrings for charset strings
2024-01-06 23:08:14 +01:00
Dennis Korpel
37cd223f3a Remove std.conv import from bitfields template 2024-01-07 05:33:56 +08:00
Dennis Korpel
89d36e1228 std.uni: use hexstrings for charset strings 2024-01-06 17:49:13 +01:00
Dennis Korpel
a11fb5e3ed Upgrade std.uni to Unicode 15.1.0 2024-01-06 13:06:48 +01:00
Dennis
2dacb0e7e8
Merge pull request #8859 from jtbx/ErrnoException.errnomsg
Add errnoMsg property to ErrnoException
2024-01-05 13:10:46 +01:00
Vladimir Panteleev
73a54e2fab std.typecons: Support non-copyable types
Fixes issue 24318.
2024-01-05 07:38:16 +08:00
Vladimir Panteleev
826b00ff58 std.typecons: Avoid a copy in Nullable.opAssign
Use `move` directly.
2024-01-05 07:38:16 +08:00
Vladimir Panteleev
bc2ad75289 std.typecons: Allow calling destructor on default value in unittest
Generally, if a type has a default value, it should be safe to assume
that it's OK to call the destructor on a default-initialized variable.

The converse is not compatible with `move`, and goes against
implementing non-copyable types.
2024-01-05 07:38:16 +08:00
Vladimir Panteleev
03a961d5a5 std.typecons: Refactor a unit test for clarity 2024-01-05 07:38:16 +08:00
Dennis
e84acb742c
Merge pull request #8869 from dkorpel/std-net-remove-regex
Remove regex usage from std.net.curl
2023-12-30 17:09:36 +01:00
Dennis
713ac8032b
Merge pull request #8866 from eoan-ermine/issue#24075
Fix issue 24075 - Can't use toChars with `ushort` or `ubyte`
2023-12-30 17:06:28 +01:00
Dennis
b29f127886
Update std/conv.d 2023-12-30 15:22:21 +01:00
Dennis
216e572913
Merge pull request #8867 from ntrel/systime
[std.datetime] Tweak docs
2023-12-29 20:47:32 +01:00
Nick Treleaven
3972c7cfd3 Fix import 2023-12-29 13:41:09 +00:00
Danil Sidoruk
7d012ab076
Replace case (type) num -> type(num) 2023-12-24 20:57:45 +03:00
Dennis Korpel
096dee19e0 Remove regex usage from std.net.curl 2023-12-24 18:08:35 +01:00
Nick Treleaven
5e93d4f9c9 [std.datetime] Tweak docs
Add links to package.d.
Tweak formatting for SysTime, use PANEL.
Use REF_SHORT after first reference.
List TimeOfDay cast target.
Move currTime link to See Also.
Fix anchor for currTime - need `.` prefix before fully-qualified names.

Part of Issue 24288.
2023-12-21 14:52:25 +00:00
Danil Sidoruk
db91b6ccbc
Add unittests for ubyte, ushort, byte, short overloads of conv.toChars 2023-12-20 18:06:47 +03:00
Danil Sidoruk
ce1da54631
Fix issue 24075 - Can't use toChars with ushort or ubyte 2023-12-20 18:06:35 +03:00
HuskyNator
e5e6f6088d Fix misplaced doc backticks and reorder attributes
Reorder attributes as per style guidelines:
> Attributes should be listed in alphabetical ordering

Fix issue 24278
2023-12-15 01:48:21 +01:00
HuskyNator
e425dc69d1 Document problematic behaviour 2023-12-15 01:32:48 +01:00
HuskyNator
00a2b65db9 Separate assert statements 2023-12-12 16:04:58 +01:00
HuskyNator
473bb759d2 Fix tests 2023-12-10 16:08:38 +01:00