1

MSVC 2015 chokes on the following statement:

if (result > std::numeric_limits<int32_t>::max())
{
    ...
}

with this error:

error C2589: '(': illegal token on right side of '::'

Any idea why?

(I suspected it's an unimplemented C++11 feature and checked C++11 feature support for MSVC 2015, but have not found anything to indicate this).

EDIT

I'm trying to compile libosmium, which is a header-only library that makes heavy use of C++11 templating features. The above error occurs in osmium/osm/location.hpp. If I include this header file in main.cpp, with no other includes, it compiles without issues. If the header file is included via other headers, the error occurs.

Tony the Pony
  • 40,327
  • 71
  • 187
  • 281

0 Answers0