Printing shortest decimal form of floating point number with Mir

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Wed Dec 23 21:48:28 UTC 2020


On Wednesday, 23 December 2020 at 21:47:32 UTC, Ola Fosheim 
Grøstad wrote:
> On Wednesday, 23 December 2020 at 21:37:11 UTC, Ola Fosheim 
> Grøstad wrote:
>>     foo.f;
>>     foo.b;
>>     bar.f;
>>     bar.b;
>> }
>
> argh, forget that... I am tired... Sorry.

template<class T>
struct Foo {
};

template<class T>
using Bar = Foo<T>;

template<class T>
void f(Foo<T> x) {};

template<class T>
void b(Bar<T> x) {}

int main() {
     auto foo = Foo<int>();
     auto bar = Bar<int>();
     f(foo);
     b(foo);
     f(bar);
     b(bar);
}

better...


More information about the Digitalmars-d-announce mailing list