On Sat, 27 Nov 2010 10:59:42 -0500, Torarin <[email protected]> wrote:
2010/11/27 Andrei Alexandrescu <[email protected]>:
We use template constraints for that kind of stuff.
Andrei
Yes, and that's great, but is there a way to check whether a template
argument matches a defined interface?
We have stuff like isInputRange!R.
It's exactly what you want, but you have to do a bit more work.
I would expect in about 1-2 days some template guru will come up with:
implements!(T, U)
which does all the boilerplate work of trying to see if U can be
substituted anywhere T is used.
-Steve