If a function is only used for CTFE, compiler can elide its codegen. It's in the scope of optimization.
Kenji Hara 2014-02-17 22:48 GMT+09:00 Dicebot <[email protected]>: > On Monday, 17 February 2014 at 09:33:01 UTC, Max Samukha wrote: > >> But that's an awful dangerous hack. A better solution is needed. >> > > I have been thinking about addition of something like `pragma(nocodegen)` > to the language. Should be simple to implement and can fix some of most > crazy bloat issues in libraries until something like whole-program > optimization can become practical reality. > > It will help not only CTFE - for example, all template constraints and all > template argument list metaprogramming facilities can be annotated with it > in Phobos. > > Walter, would you approve something like this? >
