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 4d20dc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/format/internal/write.d
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,7 @@ enum HasToStringResult
customPutWriterFormatSpec,
}

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

template hasToString(T, Char)
{
Expand Down

0 comments on commit 4d20dc7

Please sign in to comment.