Boost logo

Boost Users :

Subject: Re: [Boost-users] Compile errors in pointer_traits.hpp after upgrade to 1_58_0
From: James Walker (jamesw_at_[hidden])
Date: 2015-04-20 15:39:03


On 4/20/2015 11:36 AM, Nat Goodspeed wrote:
> On Mon, Apr 20, 2015 at 2:12 PM, James Walker <jamesw_at_[hidden]> wrote:
>
>> After switching from Boost 1_57_0 to 1_58_0, I get various compile errors in
>> pointer_traits.hpp, where it uses the macro
>> BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE:
>>
>> warning: declaration does not declare anything
>> error: use of undeclared identifier 'check'
>> error: 'U' does not refer to a value
>>
>> This is with Xcode 4.6.3 and the Apple LLVM 4.2 compiler.
>
> I haven't experienced that myself, so this is only a wild guess.
>
> However -- Apple defines a 'check' macro in some system header that
> notoriously wreaks havoc on software that innocently uses the name
> 'check' for a perfectly legal data member.
>
> Try '#undef check' before your #include for Boost sources?

Yes, that works, thanks. Apparently it's coming from AssertMacros.h.
It also works to say

#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0

in a prefix header.


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