Skip to content

Commit

Permalink
Change how preview=in is detected
Browse files Browse the repository at this point in the history
This is a minor internal change, but will allow us to deprecate in ref at the parser level.
  • Loading branch information
Geod24 committed Feb 28, 2023
1 parent 6d647c5 commit 2e8f217
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion std/format/internal/write.d
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,8 @@ enum HasToStringResult
customPutWriterFormatSpec,
}

private enum hasPreviewIn = !is(typeof(mixin(q{(in ref int a) => a})));
private alias DScannerBug895 = int[256];
private immutable bool hasPreviewIn = ((in DScannerBug895 a) { return __traits(isRef, a); })(DScannerBug895.init);

template hasToString(T, Char)
{
Expand Down

0 comments on commit 2e8f217

Please sign in to comment.