Opened 13 years ago
Closed 13 years ago
#3687 closed Bugs (fixed)
Boost.Serialization fails to compile on Solaris 10 x86 with gcc because of template that uses same name as SS macro
Reported by: | anonymous | Owned by: | Robert Ramey |
---|---|---|---|
Milestone: | Boost 1.42.0 | Component: | serialization |
Version: | Boost 1.41.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
/usr/include/sys/regset.h on Solaris 10 contains:
#define SS 18 /* only stored on a privilege transition */
boost/serialization/static_warning.h contains:
template<int i> struct SS {};
The unavoidable combination produces the compilation error:
boost/serialization/static_warning.hpp:96: error: expected unqualified-id before numeric constant
The combination is unavoidable because regset.h is pulled in by headers included by other boost headers.
Solution: rename SS template to something else (e.g., boost_SS).
Although the BSW macro doesn't conflict with anything I'm aware of, it would be prudent to rename that macro (perhaps to BOOST_SERIALIZATION_STATIC_WARNING), to avoid future conflicts on other platforms.
fixed in trunk.
Robert Ramey