Archived

This forum has been archived. Please start a new discussion on GitHub.

std::max issue on Debian

Hi,


I get the following error when compiling on a clean Debian:
/src/cpp/include/Ice/IconvStringConverter.h: In member function âvirtual Ice::Byte* Ice::IconvStringConverter<charT>::toUTF8(const charT*, const charT*, Ice::UTF8Buffer&) constâ:
/src/cpp/include/Ice/IconvStringConverter.h:263: error: expected unqualified-id before â(â token
/src/cpp/include/Ice/IconvStringConverter.h: In member function âvirtual void Ice::IconvStringConverter<charT>::fromUTF8(const Ice::Byte*, const Ice::Byte*, std::basic_string<_CharT, std::char_traits<_CharT>, std::allocator<_CharT> >&) constâ:
/src/cpp/include/Ice/IconvStringConverter.h:325: error: expected unqualified-id before â(â token

This issue is simply resolved by adding:
#ifdef max
#  undef max
#endif // max


Greetings,
Steven

Comments

  • I also ran into this same issue compiling an application with Gentoo, and it turned out I had a 3rd party matrix math header that was including some symbols into the standard namespace (using namespace std;), etc. Removing that and changing the order of #includes fixed the issue.