Approaches to function SFINAE in C++
I have seen method 2 used more often in stackoverflow, but I prefer method 1. Suggestion: prefer method 2. Both methods work with single functions. The problem arises when you have more than a function, with the same signature, and you want enable only one function of the set. Suppose that you want enable foo(), … Read more