Printing shortest decimal form of floating point number with Mir

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Jan 4 14:37:53 UTC 2021


On Monday, 4 January 2021 at 14:11:28 UTC, ag0aep6g wrote:
> `Bar!int` is an alias. It's indistinguishable from `Foo!int`. 
> The code fails in the same manner when you replace "Bar!int" 
> with "Foo!int".


Wrong. This succeeds:

  struct Foo(T) {}

   alias Bar(T) = Foo!T;

   void f(T)(Foo!T x) {}

   void main() {
     f(Bar!int());
   }




More information about the Digitalmars-d-announce mailing list