Modify

Opened 8 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: 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);

Attachments (0)

Change History (6)

comment:1 Changed 8 years ago by chris_kohlhoff

Component: Nonethread
Owner: set to Anthony Williams
Summary: ASIO library fails with recent Sun Studio compilersunique_lock fails with recent Sun Studio compilers

comment:2 Changed 7 years ago by viboes

Type: BugsPatches

comment:3 Changed 7 years ago by Anthony Williams

Resolution: fixed
Status: newclosed

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:

#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Anthony Williams.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.