Another syntax which compiles and works is to move the enable_is as the return type:
class X
{
public:
template
typename std::enable_if< std::is_floating_point::value, void>::type Do()
{
std::cout << "yes" << std::endl;
}
template
typename std::enable_if< !std::is_floating_point::value, void>::type Do()
{
std::cout << "no" << std::endl;
}
};
int main()
{
X x;
x.Do();
getchar();
}