digitalmars.D.learn - Alias function with arguments
- Jamie (6/6) Jul 10 2019 Is it possible to alias a function and its arguments, but for
- Hakan Aras (7/13) Jul 13 2019 What you're asking for is possible (see
Is it possible to alias a function and its arguments, but for that function to only be evaluated when the alias is used? For example alias pragma(inline, true) inline inline void func(){}
Jul 10 2019
On Thursday, 11 July 2019 at 03:13:43 UTC, Jamie wrote:Is it possible to alias a function and its arguments, but for that function to only be evaluated when the alias is used? For example alias pragma(inline, true) inline inline void func(){}What you're asking for is possible (see https://run.dlang.io/is/2Lh4Dr for example). However I don't believe the code sample you're showing is possible, because aliases always evaluate to types or values and you can't use either of those as a function attribute. Also pragmas are not functions.
Jul 13 2019