Could we possibly have a template like the following:

satisfiesInterface!(T, Interface);

that would return true when T satisfies Interface and otherwise gives descriptive error messages via __pragma(error, ...) ?

Then isInputRange could simply use satisfiesInterface under the hood and user code had a nice tool to check their very own requirements.
I'm not sure if such a template is possible though.

Reply via email to