Boost logo

Boost Users :

Subject: Re: [Boost-users] is_dereferenceable.hpp fails to compile with Apple Clang 3.0
From: Daniel James (dnljms_at_[hidden])
Date: 2011-12-12 06:19:17


> On Mon, Dec 12, 2011 at 2:01 AM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
>>
>> This is because of Apple's evil
>> #define check(x)

On 12 December 2011 01:16, István Csanády <istvancsanady_at_[hidden]> wrote:
> I have removed the BOOST_STATIC_CONSTANT macro and made the
> substitution by hand but is there any workaround to make this work
> without modifying boost headers?

If possible, it's best to avoid the problematic Apple header. If not
try either including the boost headers before the apple headers or
undefining check before including boost:

#if defined(check)
#undef check
#endif

#include <boost/iostreams/...>

Since the problematic code is in an implementation detail, I think we
can fix this for the next version of boost by renaming 'check'.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net