【发布时间】:2015-07-28 13:49:05
【问题描述】:
我已经写了这段代码
在标题中的类中
template <typename T,
typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
T GetResultValueAsNumber(char * result);
比内联文件中
template <
typename T,
typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type
>
T PostgreSQLWrapper::GetResultValueAsNumber(char * result)
{
double value = strtod(result, NULL);
return static_cast<T>(value);
};
在 Visual Studio 2013 中,我收到了这个警告(但代码可以正常工作)
warning C4544: '<unnamed-symbol>' : default template argument ignored on this template declaration - see declaration of '<unnamed-symbol>'
什么意思?
【问题讨论】:
标签: c++ visual-studio c++11