Xcode error compiling c++ Expected member name or ';' after declaration specifiers Xcode error compiling c++ Expected member name or ';' after declaration specifiers xcode xcode

Xcode error compiling c++ Expected member name or ';' after declaration specifiers


Don't know your exact setup, but there have been historical reports when source code references AssertMacros.h and also has some definition of a check method. In my test code:

#include <stdio.h>#include <AssertMacros.h>class InverseSumSquaredError {public:   void check(void) const;}

I observed the same error. Including the line:

#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0

prior to including AssertMacros.h fixes the issue.