DMD producing huge binaries
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 19 08:39:51 PDT 2016
On 5/19/16 10:43 AM, Steven Schveighoffer wrote:
> Or even better:
>
> template(T) foo if (someConstraints)
> {
> struct Result
> {
> T t;
> }
>
> auto foo(T t)
> {
> return Result(t);
> }
> }
This solution works awesomely, actually. It even produces smaller code
than moving the struct completely outside.
I'm going to use this mechanism in iopipe to get my voldemorts back :)
-Steve
More information about the Digitalmars-d
mailing list