Difference between SFINAE and tag dispatch
问题 In this video https://youtu.be/Vkck4EU2lOU?t=582 "tag dispatch" and SFINAE are being presented as the alternatives, allowing to achieve selection of the desired template function. Is it correct? Isn't "tag dispatch" using SFINAE? If it's correct, what is the difference between SFINAE and tag dispatch exactly? 回答1: Tag dispatch takes advantage of overload resolution to select the right overload. auto f_impl(std::true_type) { return true; } auto f_impl(std::false_type) { return std::string("No"