#4071 closed Patches (fixed)
unique_lock fails with recent Sun Studio compilers
Reported by: | Owned by: | Anthony Williams | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | thread |
Version: | Boost 1.42.0 | Severity: | Problem |
Keywords: | Cc: |
Description
boost/thread/locks.hpp has conditional code applied to all Sun Studio compilers, but recent compilers don't produce the right result with the workarounds. The workarounds should be restricted to older compilers (a one-line change in two places). Here are the diffs:
--- boost/thread/locks.hpp (revision 61052) +++ boost/thread/locks.hpp (working copy) @@ -214,7 +214,7 @@
unique_lock& operator=(unique_lock&); unique_lock& operator=(upgrade_lock<Mutex>& other);
public:
-#ifdef SUNPRO_CC +#if BOOST_WORKAROUND(SUNPRO_CC, < 0x5100)
unique_lock(const volatile unique_lock&);
#endif
unique_lock():
@@ -300,7 +300,7 @@
return detail::thread_move_t<unique_lock<Mutex> >(*this);
}
-#ifdef SUNPRO_CC +#if BOOST_WORKAROUND(SUNPRO_CC, < 0x5100)
unique_lock& operator=(unique_lock<Mutex> other) {
swap(other);
Change History (6)
comment:1 by , 13 years ago
Component: | None → thread |
---|---|
Owner: | set to |
Summary: | ASIO library fails with recent Sun Studio compilers → unique_lock fails with recent Sun Studio compilers |
comment:2 by , 12 years ago
Type: | Bugs → Patches |
---|
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 12 years ago
I think the patch got messed up because of wiki formatting, and that should be:
#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
This is causing a warning, in #4363.
comment:6 by , 12 years ago
I was referring to the __
in __SUNPRO_CC
which was interpreted as underline markup and was stripped out, which is why the commit used SUNPROC_CC
which causes the warning.
Fixed on trunk.