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((() { return 3.14f; })()));
  11. }
  12.  
Success #stdin #stdout 0.01s 2120KB
stdin
Standard input is empty
stdout
3.14