fork download
  1. import std.stdio;
  2.  
  3. ref int foo(ref int i) { return i; }
  4. ref float foo(ref float f) { return f; }
  5.  
  6. auto transparent_forwarder(T)(T t) { return foo(t); }
  7.  
  8. void main()
  9. {
  10. writeln(transparent_forwarder((() => 3.14f)()));
  11. }
  12.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.d(10): expression expected, not ')'
prog.d(10): expression expected, not '>'
prog.d(10): found '3.14f' when expecting ')'
stdout
Standard output is empty