Commit graph

135 commits

Author SHA1 Message Date
Nicolò Monaldini
0d724aa0c8
Fix %*s handling by formattedRead() (#10654) 2025-03-03 06:59:08 +08:00
Iain Buclaw
7be45e8e01 unittest: Don't run x87 log2 test on 64-bit real targets 2025-01-19 15:45:14 +01:00
Dennis
600c721875
Fixes for -preview=rvaluerefparam (#9092)
* Update `hasToString` for `-preview=rvaluerefparam`

* Remove ref parameter test of parse()
2024-11-26 22:29:24 -08:00
Vladiwostok
231ae8b68a
Fix D-Scanner linting issues (#9070)
* Fix UndocumentedDeclarationCheck linting issue

* Fix IfConstraintsIndentCheck linting issue

* Address feedback

* Fix publictests CI

* Fix old (libdparse) D-Scanner linting warn
2024-10-27 01:21:56 -07:00
0-v-0
59200013b3
Remove std.conv import from skipData (#9040) 2024-08-07 17:21:24 +03:00
0-v-0
d8e8f1f351 Remove std.conv import from quickSortImpl 2024-06-22 11:07:40 +08:00
Dennis
13816d78f3
Reduce imports needed to print floats (#8890) 2024-01-10 17:46:22 +02:00
Dennis Korpel
3b383798dd Fix unsafe union access in std.format 2023-07-27 20:26:20 +02:00
Dennis
5cd77a6e32
User hyperlinks to refer to bugzilla issues (#8766) 2023-06-16 14:45:44 +03:00
Geod24
2e8f217ae9 Change how preview=in is detected
This is a minor internal change, but will allow us to deprecate in ref at the parser level.
2023-02-28 12:56:43 +01:00
RazvanN7
61658d2372 Remove alias this from classes in phobos 2023-01-26 14:35:08 +02:00
Lucian Danescu
8293310cd8 rename variables 2022-11-09 23:28:55 +02:00
Lucian Danescu
452b1def78 same name fix 2022-11-07 19:20:19 +02:00
Per Nordlöw
b9ba6c2d97 Merge remote-tracking branch 'upstream/master' into avoid-EnumMembers-in-formatValueImpl-enum 2022-11-02 13:16:32 +01:00
Iain Buclaw
e99ec12056
Merge pull request #8618 from ibuclaw/merge_stable
merge stable
2022-11-01 14:58:25 +01:00
Iain Buclaw
a2c7d6d7e9 Merge remote-tracking branch 'upstream/stable' into merge_stable 2022-11-01 11:40:20 +00:00
Paul Backus
94fa37f2bf Fix issue 23400 - Can't format enum value whose base type has non-const opEquals 2022-10-16 17:46:21 -04:00
Per Nordlöw
829afd9783 Merge remote-tracking branch 'upstream/master' into reduce-put-in-formatValueImpl-enum 2022-10-14 10:06:31 +02:00
Per Nordlöw
b1c705c697
Use early return in formatValueImpl to reduce indentation (#8600) 2022-10-14 06:19:02 +08:00
Per Nordlöw
3cada1e3c2 Avoid two calls to put in enum overload of formatValueImpl 2022-10-12 09:10:02 +02:00
Per Nordlöw
1b6b22eab3 Remove variable members in formatValueImpl 2022-10-12 07:07:42 +02:00
Paul Backus
53240af537
Use __traits(identifier) to format enum member (#8594)
No behavioral change, but simplifies the code.
2022-10-12 05:57:34 +08:00
Per Nordlöw
5fa1eb3442 Avoid use of EnumMembers in enum specialization of formatValueImpl 2022-10-11 14:37:19 +02:00
Paul Backus
223b82ac26 Fix 23246 - std.format ignores non-const toString method of associative array value 2022-07-13 15:47:33 -04:00
Paul Backus
e1ba05dab1 Fix 23245 - std.format ignores non-const toString method of static array element 2022-07-13 15:46:29 -04:00
Paul Backus
fc8f333ca3
Fix issue 22873 - Wrong std.format output for inout (#8409)
Fix issue 22873 - Wrong std.format output for `inout`

Signed-off-by: Steven Schveighoffer <schveiguy@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>
2022-03-22 13:32:02 +00:00
wolframw
4687883231 Fix Issue 18051 - missing enum support in formattedRead/unformatValue 2021-12-31 10:28:04 +00:00
Per Nordlöw
4b5785c4e3 Reduce template bloat in IntegralTypeOf-overload of formatValueImpl 2021-10-22 09:37:40 +00:00
Per Nordlöw
dd310f3543 Use string compile-time concatenation assigned to enums then passed to put()
Reverts https://github.com/dlang/phobos/pull/8277/files.
2021-10-15 09:16:21 +00:00
Per Nordlöw
0812f7a4e0 Avoid string concatenations in put() calls to avoid GC allocations 2021-10-14 18:26:14 +00:00
Per Nordlöw
46d416fa9d Qualify some function parameters under std.format as const to reduce template bloat 2021-09-22 23:12:15 +00:00
Martin Nowak
7a461990da Merge remote-tracking branch 'upstream/stable' into merge_stable 2021-06-04 13:02:58 +02:00
Martin Kinkelin
679521d44e std.format.internal.floats: Restore compilability of unittests for targets with quadruple real precision
Such as non-Apple AArch64; `printFloat()` doesn't support that format.
2021-06-03 07:56:06 +00:00
Martin Nowak
14f71b32fa Merge remote-tracking branch 'upstream/stable' into merge_stable 2021-05-28 13:04:01 +02:00
Martin Kinkelin
8f262acda1 std.format.internal.write: Replace brittle runtime check by compile-time check
When checking whether `T.toString` for some class `T` is inherited from
base class `Object`.

The runtime check fails when using a druntime DLL on Windows, where
`Object.toString` in other DLLs/executables is a trampoline (in the
druntime import library) to the dllimported function, with its own
identity.
2021-05-23 15:42:44 +02:00
berni44
85afd3555f std.format: Clean up rounding of floats. 2021-05-20 17:59:09 +08:00
Razvan Nitu
16d01b0d14
Merge pull request #8073 from berni44/rounding_f
std.format: Use rounding tool to round %f on floats.
2021-05-20 14:31:59 +08:00
Iain Buclaw
116d33b635 Revert "Fix Issue 9489 - writeln of struct with disabled copy ctor"
This reverts commit 838da632cb.
2021-05-17 23:03:37 +02:00
berni44
9205a37823 std.format: Use rounding tool to round %f on floats. 2021-05-14 20:56:30 +02:00
Razvan Nitu
d154c239c4
Merge pull request #8050 from berni44/rounding_e
std.format: Use rounding tool to round %e on floats.
2021-05-14 14:38:42 +08:00
Razvan Nitu
dba3cbc88c
Merge pull request #8059 from berni44/rounding_a
std.format: Use rounding tool to round %a on floats.
2021-05-13 14:35:19 +08:00
berni44
838da632cb Fix Issue 9489 - writeln of struct with disabled copy ctor 2021-05-12 09:41:58 +02:00
berni44
3b4dc67878 Make unittests in std.format @safe 2021-05-11 16:13:09 +02:00
berni44
73b1ab5f9d std.format: Use rounding tool to round %a on floats. 2021-05-10 10:37:03 +02:00
Razvan Nitu
f33b92f74f
Merge pull request #8049 from berni44/issue_21900
Fix Issue 21900 - std.format: round to even does not work for hex integers with letters
2021-05-10 15:50:30 +08:00
berni44
6bcc66a071
std.format: Remove outdated printFloatTest (#8054) 2021-05-09 21:37:08 +08:00
berni44
3bff76a820 std.format: formatting floating points is meanwhile pure 2021-05-08 21:23:57 +02:00
berni44
e245115274 std.format: Use rounding tool to round %e on floats. 2021-05-07 17:08:41 +02:00
berni44
430d506d35 Fix Issue 21900 - std.format: round to even does not work for hex integers with letters 2021-05-07 15:24:27 +02:00
berni44
e53d010def extractBitpattern: Add implied bit to mantissa and subtract bias from exponent. 2021-05-07 09:37:18 +02:00