On 5/19/22 8:29 PM, Steven Schveighoffer wrote:
Given a CTFE function it's very easy to wrap for ensuring compile-time usage:```d enum ctGrey(float f) = grey(f); auto myColor = ctGrey!(0.5); ```
That being said, if it's calculatable at compile time, chances are the compiler is already going to do it, even for a standard constructor call, especially if there's no custom constructor.
-Steve