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
Vladimir Panteleev
28b9d08fa2
Fix Issue 21916 - Error message is obfuscated when using wrong format specifier at compile-time
2021-05-13 02:22:27 +02: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
36221cf4cc
Revert "Fix Issue 21456 - std.format does not accept enum member with string base type as template parameter"
...
This reverts commit 974a88a967
.
2021-05-10 18:30:05 +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
Razvan Nitu
b78773c5a4
Merge pull request #8015 from berni44/add_integer_efga
...
std.format: Add formatting integers with %e, %f, %g and %a.
2021-05-07 14:59:25 +08:00
berni44
03447d6cc7
Fix Issue 21808 - std.format: It should be possible to change the order of key and value of AAs.
2021-05-05 09:12:40 +02:00
berni44
974a88a967
Fix Issue 21456 - std.format does not accept enum member with string base type as template parameter
2021-05-04 14:36:02 +02:00
berni44
6d5d3e6f0e
std.format: handle "exotic" reals by casting to double
2021-05-03 12:29:15 +02:00
berni44
8d97da17d0
Move bitpattern extraction from std.format to std.math.
2021-04-30 09:37:22 +02:00
berni44
dbfb742ccd
Fix Issue 21875 - std.format: wrong number of format specifiers in
...
nested format string of associative arrays should be detected
2021-04-29 15:26:05 +02:00
berni44
3206e52aae
Clean up after making formating floating point numbers @nogc.
2021-04-27 13:18:11 +02:00
berni44
99cbab9584
Fix Issue 21858 - std.format: centering output
2021-04-26 19:20:41 +02:00
berni44
5fbc1da0fa
Fix Issue 21847 - std.format: %e, %g and %a should be supported for integers too
2021-04-26 17:10:05 +02:00
berni44
ad5247072f
std.format: Add formatting integers with %e, %f, %g and %a.
2021-04-26 16:28:00 +02:00
berni44
edb1237abc
Add rounding tool.
2021-04-26 16:28:00 +02:00
The Dlang Bot
fe172268e8
Merge pull request #8007 from berni44/float_f_nogc
...
std.format: Make formatting %f (and %g partly) 100% @nogc.
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2021-04-24 12:55:55 +02:00
The Dlang Bot
6b14e37a4c
Merge pull request #8006 from berni44/float_e_nogc
...
std.format: Make formatting %e (and partly %g) 100% @nogc.
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2021-04-24 12:12:43 +02:00
berni44
469a427d4d
Fix Issue 21842 - std.format: "%-+05,g" adds extra comma
2021-04-24 10:58:21 +02:00
berni44
b6a51524f3
std.format: Make formatting %f (and %g partly) 100% @nogc.
2021-04-24 10:57:31 +02:00
berni44
ac00658c00
Fix Issue 21841 - std.format: grouping produces strange result with zero precision and %e
2021-04-24 10:47:03 +02:00
berni44
ce00bcec6c
Fix Issue 21840 - std.format: grouping ignores space flag with %e
2021-04-24 10:33:30 +02:00
berni44
22530aa775
std.format: Make formatting %e (and partly %g) 100% @nogc.
2021-04-24 10:31:57 +02:00
berni44
088b589352
Fix Issue 21838 - std.format: Grouping garbles up %a output
2021-04-24 10:21:14 +02:00
berni44
47e39640fd
std.format: Make formatting with %a 100% @nogc.
2021-04-24 10:18:27 +02:00
berni44
0cbeff86e9
Fix Issue 21836 - std.format: grouping may cause RangeError
2021-04-24 16:15:10 +08:00
berni44
cd6b8d9e91
std.format: Make formatting 0.0 100% @nogc.
2021-04-24 16:15:10 +08:00
berni44
110cb1a8be
Fix Issue 21853 - std.format: formatting real.max in CTFE fails
2021-04-24 02:52:53 +02:00
Razvan Nitu
0881660baf
Merge pull request #7971 from berni44/float_naninf_nogc
...
std.format: Make formatting nan and inf 100% @nogc.
2021-04-23 15:28:20 +08:00
berni44
622692b102
Fix Issue 21846 - std.format: provided format string for toString does not work with grouping
2021-04-22 11:07:58 +02:00
berni44
dd69d5531d
std.format: Refactor formatReflectTest
2021-04-22 03:21:31 +02:00
berni44
297ce7e865
std.format: Refactor formatTest
2021-04-22 02:37:46 +02:00
berni44
b467899dc0
std.format: make reflection test work for floating point values
2021-04-21 20:23:16 +02:00
berni44
5e3725363b
std.format: Remove arrayPtrDiff.
2021-04-21 19:43:47 +02:00
berni44
109ecbc43c
std.format.spec: remove unused private function headUpToNextSpec.
2021-04-21 19:11:59 +02:00
berni44
c78646ba93
Make std.format.internal.write: formatTest private.
2021-04-21 17:37:23 +02:00