Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4071 closed Patches (fixed)

unique_lock fails with recent Sun Studio compilers

Reported by: stephen.clamage@… Owned by: anthonyw
Milestone: Boost 1.43.0 Component: thread
Version: Boost 1.42.0 Severity: Problem
Keywords: Cc:


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);



unique_lock(const volatile unique_lock&);



@@ -300,7 +300,7 @@

return detail::thread_move_t<unique_lock<Mutex> >(*this);



unique_lock& operator=(unique_lock<Mutex> other) {


Attachments (0)

Change History (6)

comment:1 Changed 7 years ago by chris_kohlhoff

  • Component changed from None to thread
  • Owner set to anthonyw
  • Summary changed from ASIO library fails with recent Sun Studio compilers to unique_lock fails with recent Sun Studio compilers

comment:2 Changed 7 years ago by viboes

  • Type changed from Bugs to Patches

comment:3 Changed 7 years ago by anthonyw

  • Resolution set to fixed
  • Status changed from new to closed

Fixed on trunk.

comment:4 Changed 7 years ago by anonymous

I think the patch got messed up because of wiki formatting, and that should be:


This is causing a warning, in #4363.

comment:5 Changed 7 years ago by stephen.clamage@…

Yes, in the wiki view, two lines are merged into one in two places.

comment:6 Changed 7 years ago by anonymous

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.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain anthonyw.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.