foreach, opApply, and inline
BCS
ao at pathlink.com
Sun Oct 7 16:12:35 PDT 2007
Reply to Tor,
> When I compile the following code with dmd 1.015, separate functions
> are generated for main, subset's opApply, and the body of the foreach.
> Is there a way to get dmd to inline opApply and the body of the
> foreach when the opApply is known and the body of the foreach is
> known? (More generally, is it possible to declare a function
> accepting a delegate argument so that the delegate will get inlined if
> it is known at compile time?)
>
I assume you tried DMD's -inline flag?
I have often though that the inlining should work in the more general case
where small function get called with a known delegate.
More information about the Digitalmars-d
mailing list