Thread overview |
---|
August 25, 2014 Cross-module inlining with separate compilation? | ||||
---|---|---|---|---|
| ||||
Is there a way to have cross-module inlining but with separate compilation? Like with link-time generation in C++ compilers. |
August 26, 2014 Re: Cross-module inlining with separate compilation? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ponce Attachments: | On Mon, 25 Aug 2014 21:07:06 +0000 ponce via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote: > Is there a way to have cross-module inlining but with separate > compilation? > Like with link-time generation in C++ compilers. i think that turning your functions into templates should do the trick. i.e. int myfunc (int n) --> int myfunc() (int n). but this is a hack, of course. |
August 26, 2014 Re: Cross-module inlining with separate compilation? | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | On Tuesday, 26 August 2014 at 04:34:39 UTC, ketmar via Digitalmars-d-learn wrote: > On Mon, 25 Aug 2014 21:07:06 +0000 > ponce via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote: > >> Is there a way to have cross-module inlining but with separate compilation? >> Like with link-time generation in C++ compilers. > i think that turning your functions into templates should do the trick. > i.e. int myfunc (int n) --> int myfunc() (int n). > > but this is a hack, of course. No template hack needed now. https://issues.dlang.org/show_bug.cgi?id=10985 |
August 26, 2014 Re: Cross-module inlining with separate compilation? | ||||
---|---|---|---|---|
| ||||
Posted in reply to hane Attachments: | On Tue, 26 Aug 2014 04:49:17 +0000 hane via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote: > No template hack needed now. unless you using gdc, for example. ;-) |
Copyright © 1999-2021 by the D Language Foundation