Created attachment 1755
Error log, obtained from run.dlang.io
Came across this doing some templated serialisation code and keeping const correctness.
Does not error with slices.
Code:
void writeThem( T )( ref inout( T ) them )
{
import std.stdio : writeln;
import std.conv : to;
writeln( them.to!string );
}
void main()
{
const( uint )[4] vals = [ 1, 2, 3, 4 ];
vals.writeThem;
}
Comment #1 by dlang-bot — 2019-07-23T02:39:08Z
@shove70 created dlang/phobos pull request #7114 "Fix issue 20070 - std.conv.toImpl matches two functions when using st…" fixing this issue:
- Fix issue 20070 - std.conv.toImpl matches two functions when using static arrays as inout(T)
https://github.com/dlang/phobos/pull/7114
Comment #2 by dlang-bot — 2019-07-23T04:03:19Z
dlang/phobos pull request #7114 "Fix issue 20070 - std.conv.toImpl matches two functions when using st…" was merged into stable:
- f75fcf02581093cfd8fb1a4d46d8ea97fc7b2e23 by shove70:
Fix issue 20070 - std.conv.toImpl matches two functions when using static arrays as inout(T)
https://github.com/dlang/phobos/pull/7114