[Issue 20623] std.conv.to!string error when argument is an inout float
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 8 16:10:03 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=20623
Vijay Nayar <madric at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |madric at gmail.com
--- Comment #5 from Vijay Nayar <madric at gmail.com> ---
This error is also reproducible using enums, e.g.:
``` d
import std.conv : to;
struct Foo
{
enum Type { HAM, BREAD }
Type t;
void foo() inout
{
to!string(this.t);
}
}
void main()
{
Foo().foo();
}
```
> /dlang/dmd/linux/bin64/../../src/phobos/std/conv.d(1217): Error: variable `std.conv.value` only parameters or stack based variables can be `inout`
--
More information about the Digitalmars-d-bugs
mailing list