On 12/6/2017 11:41 PM, Mike Franklin wrote:
On Thursday, 7 December 2017 at 04:45:15 UTC, Jonathan M Davis wrote:
The simplest way to do that is to write a unit test that uses a static
assertion. As I understand it, with the way CTFE works, it pretty much can't
know whether a function can be called at compile time until it tries, but a
unit test can catch it if the function no longer works at compile time.
Not bad, but that is swaying into the cumbersome category. If that's the best
we can do, a @ctfeonly attribute starts looking pretty good.
More and more attributes to do essentially trivial things is cumbersomeness all
on its own.