This Code failed to compile in VS2013.
template<typename T>
class SomeClass {
public:
std::enable_if_t<std::is_fundamental<T>::value, T>
DoSomething() {
return T();
}
std::enable_if_t<!std::is_fundamental<T>::value, T>
DoSomething() {
return T();
}
};
How to make it work in VS2013(DoSomething must be non-static member function)?