On Monday, 26 October 2020 at 09:25:03 UTC, Jacob Carlborg wrote:
On Monday, 26 October 2020 at 00:56:26 UTC, frame wrote:


If you pass the delegate as a template parameter/alias parameter, it's more likely to be inlined:

auto myStuff(alias fn)() {
    try return fn();
    catch (Exception e) { }
}

myStuff!( { /* some code */ } );

--
/Jacob Carlborg

Does not work in my case. Seems to conflict with overloads, but thanks for the hint.


Reply via email to