C++ SFINAE examples?
I like using SFINAE to check boolean conditions. template<int I> void div(char(*)[I % 2 == 0] = 0) { /* this is taken when I is even */ } template<int I> void div(char(*)[I % 2 == 1] = 0) { /* this is taken when I is odd */ } It can be quite useful. … Read more