[Issue 24352] New: std.format: 'r' format cannot be checked at compile time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 22 08:55:15 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24352
Issue ID: 24352
Summary: std.format: 'r' format cannot be checked at compile
time
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: ogion.art at gmail.com
Related: https://issues.dlang.org/show_bug.cgi?id=24351
```
import std.format : format;
int x = cast(int)'x';
auto s1 = format("%r", x); // Works
auto s2 = format!"%r"(x); /* Error: reinterpreting cast from `int*` to
`const(char)*` is not supported in CTFE */
```
--
More information about the Digitalmars-d-bugs
mailing list