On Saturday, 28 May 2016 at 12:45:21 UTC, Era Scarecrow wrote:
Fourth, you could create a helper function/template that cycles through a struct of your choice and tells you if any of it's methods fail to be safe. This will require a little more work, but it could be used as a full insurance and only requires a single template call on your function to ensure the safety.

I can try and make this fourth one, but this isn't something I've done often.

Thank you.
This solution has the advantage of not bloating the code too much, but the drawback that it forces all methods of the template argument to be at least @trusted, and not only the methods that my function needs to use, so imposing a stricter-than-necessary limit on its use in @safe code.

Reply via email to