Modify

Ticket #4071 (closed Patches: fixed)

Opened 4 years ago

Last modified 4 years ago

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:

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

Change History

comment:1 Changed 4 years ago by chris_kohlhoff

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

comment:2 Changed 4 years ago by viboes

  • Type changed from Bugs to Patches

comment:3 Changed 4 years ago by anthonyw

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

Fixed on trunk.

comment:4 Changed 4 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 4 years ago by stephen.clamage@…

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

comment:6 Changed 4 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.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.