Commit graph

16118 commits

Author SHA1 Message Date
João Lourenço
c4192e855e
fix(format.read): formattedRead incorrectly static asserts with Tuple and compile-time format string
This method supports std.typecons.Tuple, however, when passing the
format string at compile-time, the format validation does not correctly
account for the std.typecons.Tuple's types and instead validates the
std.typecons.Tuple itself leading to a static assert.

This change now adds support for this feature when used with
compile-time format strings.

Fix Issue #23600

Signed-off-by: João Lourenço <jlourenco5691@gmail.com>
2023-01-05 18:39:18 +00:00
Nick Treleaven
52dfd3e553 Remove RUNNABLE_EXAMPLE to fix DAutoTest 2023-01-04 19:43:38 +00:00
Nick Treleaven
ac5108e7e0 Apply suggestions from code review
Co-authored-by: Razvan Nitu <razvan.nitu1305@gmail.com>
2023-01-04 11:38:52 +00:00
Nick Treleaven
4eaa3c49e8 Try using UL macro instead 2023-01-04 11:38:52 +00:00
Nick Treleaven
3aa94941b3 Document dirEntries throws without read permission
Part of:
Issue 12391 - dirEntries throws in foreach

Add example showing how to handle subdirectory read permission failures.
2023-01-04 11:38:52 +00:00
Gabriel Dolberg
21d7d23d4f Typo: begining -> beginning 2022-12-26 20:22:08 +01:00
Nick Treleaven
fdab7cdef9 Remove unnecessary @trusted 2022-12-24 13:07:22 +00:00
Nick Treleaven
c27f250eb5 Tweak 2 tests 2022-12-24 13:06:37 +00:00
Nick Treleaven
d5c1067131
Fix Issue 23561 - std.typecons.Unique!struct does not destroy struct … (#8651)
Fix Issue 23561 - std.typecons.Unique!struct does not destroy struct …

Signed-off-by: Luís Ferreira <contact@lsferreira.net>
Signed-off-by: Razvan Nitu <razvan.nitu1305@gmail.com>
Merged-on-behalf-of: Razvan Nitu <razvan.nitu1305@gmail.com>
2022-12-24 13:40:54 +01:00
richard (rikki) andrew cattermole
13ef27a56e Fix issue 23540 - std.uni loadProperty aliases for C are incorrect 2022-12-24 12:26:02 +13:00
Razvan Nitu
67d4521c2c
Merge pull request #8617 from rikkimax/unicode_tables
Upstream the Unicode database table generator and update the tables to 15
2022-12-19 16:49:58 +08:00
Iain Buclaw
e89ca123e2 Merge remote-tracking branch 'upstream/stable' into merge_stable 2022-12-15 18:57:45 +00:00
Iain Buclaw
2a62b4c798 std.math.exponential: Add deprecations for calling log family functions with an integral argument 2022-12-13 00:56:49 +01:00
Iain Buclaw
8e799c14dc std.math.exponential: Implement log/log2/log10 for double- and float-precision 2022-12-12 19:59:05 +01:00
Iain Buclaw
6871f95111 std.random: Fix unittests on x32 ABI targets 2022-12-12 04:02:47 +01:00
richard (rikki) andrew cattermole
e848d44d7f Emphasize DO NOT EDIT for the generated Unicode tables 2022-12-12 04:32:30 +13:00
richard (rikki) andrew cattermole
297370abc2 Add URL for Unicode table generator into the headers of the Unicode tables 2022-12-12 02:10:14 +13:00
richard (rikki) andrew cattermole
a1f2e760e7 Make Unicode tables module headers consistent and add DO NOT EDIT to it 2022-12-12 02:10:14 +13:00
richard (rikki) andrew cattermole
122df9272a Upstream Unicode table generator and update tables to v15 2022-12-12 02:10:14 +13:00
H. S. Teoh
08be61029e Clarify that .uniq by default expects a sorted range. 2022-12-09 03:18:46 +01:00
Paul Backus
792c8b7c1d Fix typo in doc for std.algorithm.mutation.fill 2022-12-06 19:52:21 +01:00
RazvanN7
67155f04e7 Fix Issue 23319 - std.range.Generator does not work with non-mutable elements 2022-12-05 15:24:34 +01:00
Dennis
09275da681
Merge pull request #8623 from ntrel/safe-readln
Make std.stdio.File.readln @safe
2022-12-05 12:15:37 +01:00
Iain Buclaw
5a9919c802 std.math.hardware: Use forceOp in another ieeeFlags test 2022-12-04 20:26:28 +01:00
Iain Buclaw
2e1f8de817 std.math.hardware: Fix broken IEEE FP flags tests
1. The `pragma(inline, false)` doesn't do what the author thinks it does
   (Issue 23520).
2. Change that introduced `blockopt` seems to have a slight
   misunderstanding about what constant propagation is (`a /= 0.0L` can
   always be constant propagated regardless of what surrounds it).
3. Undocument tests that depend on the need for forcing operations to
   disarm the optimizer, and replace with simple tests behind StdDdoc.
2022-12-03 00:17:36 +01:00
Walter Bright
7b4d3a4c3d remove use of isPointer from std.traits 2022-12-01 12:15:51 +01:00
Walter Bright
8e3d94a239 remove use of isPointer from std.exception 2022-12-01 11:51:27 +01:00
Martin Kinkelin
5645d87eb1 Fix Issue 22745 - std.parallelism.parallel fails to process empty range on a single CPU 2022-12-01 10:49:17 +00:00
Walter Bright
3eb542c91c remove use of isPointer from std.getopt 2022-12-01 11:32:06 +01:00
Razvan Nitu
8ac51eb0d4
Merge pull request #8635 from WalterBright/utfIsPointer
remove isPointer use in std.utf
2022-12-01 18:08:52 +08:00
Razvan Nitu
662055e60a
Merge pull request #8636 from WalterBright/arrayIsPointer
remove use of isPointer from std.array
2022-12-01 18:08:28 +08:00
Razvan Nitu
a74405154a
Merge pull request #8640 from WalterBright/stdioIsPointer
remove unused reference to isPointer from std.stdio
2022-12-01 18:04:22 +08:00
Razvan Nitu
e0dfddf77d
Merge pull request #8641 from WalterBright/implicitConv
replace isImplicitlyConvertible with is expression
2022-12-01 18:03:51 +08:00
Walter Bright
2c7e732236 replace isImplicitlyConvertible with is expression 2022-12-01 00:52:55 -08:00
Walter Bright
7bcb8a013d remove unused reference to isPointer from std.stdio 2022-12-01 00:32:20 -08:00
Walter Bright
e0f0e876b3 remove isScalar check from std.traits.isPointer 2022-12-01 09:32:09 +01:00
Walter Bright
12bb393be3 remove use of isPointer from std.array 2022-11-30 23:36:17 -08:00
Walter Bright
4706ae5dd1 remove isPointer use in std.utf 2022-11-30 23:12:57 -08:00
Geod24
1d50f24922 Remove usages of 'in' on Windows C bindings 2022-11-30 16:16:40 +01:00
Mathias LANG
b58d652ce5 Re-instate accidentally reverted fixes on RefCounted (#8599)
Those fixes were done in PR #8509 but PR #8368 accidentally reverted them.
2022-11-30 16:16:01 +01:00
RazvanN7
e305dc9f79 Fix getSymbolsByUDA by replacing broad __traits(compiles) with a more focused condition 2022-11-28 08:14:42 +00:00
Nick Treleaven
6c9a746295 Fix getdelim trusted encapsulation 2022-11-25 11:21:06 +00:00
Nick Treleaven
f06030819b Remove double @trusted 2022-11-25 10:50:20 +00:00
Nick Treleaven
7b8fbf0350 Remove unsafe opDispatch
Use @trusted lambda for DIGITAL_MARS_STDIO impl
2022-11-25 10:50:20 +00:00
Adam D. Ruppe
f710b083fd fix #23507 sockets are blocking by default, this needs to reflect that 2022-11-25 04:07:27 +01:00
Adam D. Ruppe
87ebb09b16 add Socket.release method to allow transitioning the handle from the object's ownership to outsdie control, so the destructor won't close it anymore 2022-11-24 00:50:37 +01:00
Nick Treleaven
4796637441 Add LockedFile.opDispatch 2022-11-19 20:26:01 +00:00
Nick Treleaven
89ce0c94de Remove LockedFile.fp method
We can use `fps` for `ferror` calls instead.
2022-11-19 17:08:00 +00:00
Nick Treleaven
59749cbc64 Remove 2 unnecessary vars 2022-11-19 14:42:03 +00:00
Nick Treleaven
96ac2e88c8 Tweak LockedFile unittest 2022-11-19 14:39:34 +00:00