Skip to content

Commit 4d20dc7

Browse files
committed
Change how preview=in is detected
This is a minor internal change, but will allow us to deprecate in ref at the parser level.
1 parent 6d647c5 commit 4d20dc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

std/format/internal/write.d

+1-1
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ enum HasToStringResult
18291829
customPutWriterFormatSpec,
18301830
}
18311831

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

18341834
template hasToString(T, Char)
18351835
{

0 commit comments

Comments
 (0)