Suppose I have a templated struct member function for which I can compute at compile-time when the function is memory safe, and when it is not. But, the compiler cannot correctly determine this automatically.

What is the best way to express this in code? Other than straight-up duplicating the implementation, the only answer I've come up with so far is to create a `private @system` implementation function, and then separate `public @system` and `public @trusted` wrappers with appropriate template constraints.

Is there a better way?

Reply via email to