Commit graph

16 commits

Author SHA1 Message Date
Nicolò Monaldini
0d724aa0c8
Fix %*s handling by formattedRead() (#10654) 2025-03-03 06:59:08 +08:00
João Lourenço
6b666971bc
Add 'std.format.read.formattedRead' overloads to return a Tuple with values read (#8647)
* refactor(formattedRead): add not is type validation to template argument 'fmt'

Signed-off-by: João Lourenço <jlourenco5691@gmail.com>

* feat(formattedRead): add overloads to return a tuple with the read values

Signed-off-by: João Lourenço <jlourenco5691@gmail.com>

* test(formattedRead): add unnittests for the tuple return type overloads

Signed-off-by: João Lourenço <jlourenco5691@gmail.com>

* chore(changelog): add a changelog formattedRead entry

Signed-off-by: João Lourenço <jlourenco5691@gmail.com>

---------

Signed-off-by: João Lourenço <jlourenco5691@gmail.com>
2024-11-25 20:43:04 -08:00
João Lourenço
7cc45a81df
test(format.read): add formattedRead compile-time format string overload with Tuple arguments unit tests
Signed-off-by: João Lourenço <jlourenco5691@gmail.com>
2023-01-05 18:39:30 +00:00
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
Dennis Korpel
ba92563a0d Fix issue 22939 - bad error message: Error: no property msg for type string 2022-03-29 18:51:30 +00:00
wolframw
4687883231 Fix Issue 18051 - missing enum support in formattedRead/unformatValue 2021-12-31 10:28:04 +00:00
Ramanuj
afb382485b
Fix Issue 20393 - formattedRead accepts input, that should be rejected (#8144) 2021-06-16 16:08:53 +08:00
berni44
3b4dc67878 Make unittests in std.format @safe 2021-05-11 16:13:09 +02:00
berni44
ca06454cfb Move unittests from std/format/package.d at correct place. 2021-04-21 15:24:44 +02:00
berni44
b2019ebab0 Narrow imports of std.math in the rest of phobos. 2021-04-21 03:00:57 +02:00
berni44
1d713e6f73 Move unittests from std.format.internal.write at correct place. 2021-04-20 11:27:33 +02:00
berni44
1cdbc9cf87 Rework documentation of std.format.read: Module description 2021-04-07 13:13:23 +02:00
berni44
fe178582f2 Rework documentation of std.format.read : unformatValue 2021-03-31 13:39:44 +02:00
berni44
f8740f2e38 Rework documentation of std.format.read : formattedRead 2021-03-29 18:35:04 +02:00
berni44
a8ab4e2565 std.format: Refactor read.d 2021-03-16 14:57:38 +01:00
berni44
e2045219ff std.format: Split off std/format/read.d 2021-03-15 21:29:29 +01:00