I just updated boost to version 1.48.0 on a project i am developing on OSX Lion that also includes the Cocoa headers. After doing so I got a load of errors all pointing to has_prefix_operator.hpp and has_binary_operator.hpp which all point to lines like i.e.:
BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
../../boost_1_48_0/boost/type_traits/detail/has_binary_operator.hpp:157:4: error: expected expression [1]
After trying around, since I could not really read any sense into these errors, I noticed that if I switch the inclusion order from:
#import <Cocoa/Cocoa.h>
#include <boost/type_traits.hpp>
to
#include <boost/type_traits.hpp>
#import <Cocoa/Cocoa.h>
things magically work. I am very confused about that since it worked just fine with the previous boost release and I have no clue why this is happening. Any ideas about what might be going on?
Thanks!