Unhelpful errors for unintended use of box (...) ...
syntax
#14085
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
box (...) ...
syntax
#14085
with just the first:
with the second uncommented it's a parse error:
The
(...)
is interpreted as the allocator/placement part of thebox
expression, rather than just part of the value to be boxed. It would be nice to suggest something like "if you wish to use the defaultbox
writebox () ...;
".(Also, "amusingly", the code as written above hits #14084)
The text was updated successfully, but these errors were encountered: