Join GitHub today
fix compile problem on g++ 4.8.2 on os x #54
I had to apply this patch to optional.hpp to get it to compile under Gnu g++ 4.8.2 on OS X. The source file seems to be from Boost, so I figure it's possible I'm just doing something wrong?
Here's the error I was getting:
CMake like this:
The file is an proposal for
However, I'd rather not change anything that's already there to avoid breaking stuff I have no control over. Can you try the following patch, if it works for you?
diff --git a/src/MagnumExternal/Optional/optional.hpp b/src/MagnumExternal/Optional/optional.hpp index 07db190..e837628 100644 --- a/src/MagnumExternal/Optional/optional.hpp +++ b/src/MagnumExternal/Optional/optional.hpp @@ -151,7 +151,7 @@ template <class T> inline constexpr typename std::remove_reference<T>::type&& co __assert(expr, line, file); // WHY. # elif defined __ANDROID__ __assert(file, line, expr); - # elif defined __clang__ || defined __GNU_LIBRARY__ + # elif defined __clang__ || defined __GNU_LIBRARY__ || (defined __GNUC__ && defined __APPLE__) __assert(expr, file, line); # elif defined __GNUC__ _assert(expr, file, line);