MSVC 2015扼杀了以下声明:
if (result > std::numeric_limits<int32_t>::max())
{
...
}
出现此错误:
error C2589: '(': illegal token on right side of '::'
知道为什么吗?
(我怀疑这是一个未实现的C ++ 11功能并检查C++11 feature support for MSVC 2015,但没有发现任何迹象表明这一点。)
修改
我正在尝试编译libosmium
,这是一个仅限标头的库,它大量使用C ++ 11模板功能。上述错误发生在osmium/osm/location.hpp
中。如果我在main.cpp
中包含此头文件,没有其他包含,则编译没有问题。如果通过其他标头包含头文件,则会发生错误。