Opened 14 years ago
Closed 11 years ago
#2115 closed Bugs (fixed)
Avoid bad Apple macros
Reported by: | Dave Abrahams | Owned by: | Beman Dawes |
---|---|---|---|
Milestone: | Boost 1.36.0 | Component: | inspection script |
Version: | Boost 1.35.0 | Severity: | Problem |
Keywords: | Cc: | John Maddock, mateusz@… |
Description
Apple has a header called <AssertMacros.h>
that #define
s both “check
” and “check_error
.” These macros naturally collide with the same names in Boost. We should consider a global change. That would also probably require a global policy change for checkins.
Assigning to Beman, Cc'ing John M, component "inspection script" assigned to John although I might be wrong about that, but obviously we need to discuss this. Maybe we'll decide to make it "wontfix"
Attachments (1)
Change History (10)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
The Wiki decided some of my text was formatting. The macro to define is "_ _ ASSERTMACROS _ _ " (w/o the spaces)
comment:3 by , 14 years ago
Status: | new → assigned |
---|
comment:4 by , 14 years ago
Made changes to boost/detail/is_incrementable.hpp to get it to compile in the presence of the Apple check macro. Please see attached file.
comment:5 by , 14 years ago
We've let this issue drop,
but... since we have the macro BOOST_PREVENT_MACRO_SUBSTITUTION to suppress this kind of unexpected macro substitution, maybe we should just go ahead and add all the Apple macros to the inspect program?
John.
comment:7 by , 13 years ago
I have added the ability to find "check", "require", "verify" and "check_error" to the inspection program. It found almost 3000 files using these identifiers (2899, to be precise).
Cleaning this up is going to be a large task.
comment:8 by , 13 years ago
Cc: | added |
---|
comment:9 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Closing inactive ticket
--Beman
Just F-everyone's-I, here's a list of the macros defined in AssertMacros.h:
debug_string, check, ncheck, check_string, ncheck_string, check_noerr, check_noerr_string, verify, nverify, verify_string, nverify_string, verify_noerr, verify_noerr_string, verify_action, require, nrequire, require_action, nrequire_action, require_quiet, nrequire_quiet, require_action_quiet, nrequire_action_quiet, require_string, nrequire_string, requireaction_string, nrequireaction_string, require_noerr, require_noerr_action, require_noerr_quiet, require_noerr_action_quiet, require_noerr_string, require_noerr_action_string.
IMHO, the really nasty ones are: check, verify, require and check_error.
My suggestion is to #define ASSERTMACROS in the darwin Jamfile, and to add a warning to the docs.