On Friday, 8 May 2020 at 22:11:57 UTC, Paul Backus wrote:
On Friday, 8 May 2020 at 22:03:47 UTC, NaN wrote:
The integer literal `1` is an rvalue, and can't be passed by
reference.
If you explicitly instantiate the templates foo and bar in the
function call, you get a more informative error message:
bam!int(foo!int(1));
Error: function onlineapp.foo!int.foo(ref int x) is not
callable using argument types (int)
cannot pass rvalue argument 1 of type int to parameter
ref int x
Ooops facepalm!
Thanks :)