Template Capture Stringency

Hey there,
I was creating a template and I realised that certain data-types/structs/classes would not be applicable to my template.
This would cause bugs and errors if used incorrectly.

Is there a way to restrict a template-capture to certain types/classes?
> Is there a way to restrict a template-capture to certain types/classes?

Yes. SFINAE http://en.cppreference.com/w/cpp/language/sfinae
Typically with std::enable_if<> http://en.cppreference.com/w/cpp/types/enable_if

Tutorial: http://eli.thegreenplace.net/2014/sfinae-and-enable_if/

Thank you very much.
Will read.
Topic archived. No new replies allowed.