Modify

Ticket #3244 (closed Patches: fixed)

Opened 5 years ago

Last modified 4 years ago

XLC warnings about missing "private" keyword when extending boost::noncopyable

Reported by: Ioannis Papadopoulos <ipapadop@…> Owned by: anthonyw
Milestone: Boost 1.40.0 Component: thread
Version: Boost 1.39.0 Severity: Problem
Keywords: mutex private noncopyable xlc warning Cc:

Description

xlc 10.1 throws warnings whenever boost::mutex and boost::recursive_mutex are used because of missing access specifier.

Example output:

"/usr/local/include/boost/thread/pthread/mutex.hpp", line 30.9: 1540-0198 (W) The omitted keyword "private" is assumed for base class "boost::noncopyable".

Attachments

3244.patch Download (3.7 KB) - added by viboes 4 years ago.
3244_2.patch Download (3.8 KB) - added by viboes 4 years ago.
Correct issue with thread_group default constructor on 4344.patch

Change History

comment:1 in reply to: ↑ description Changed 4 years ago by viboes

Replying to Ioannis Papadopoulos <ipapadop@…>:

xlc 10.1 throws warnings whenever boost::mutex and boost::recursive_mutex are used because of missing access specifier.

Example output:

"/usr/local/include/boost/thread/pthread/mutex.hpp", line 30.9: 1540-0198 (W) The omitted keyword "private" is assumed for base class "boost::noncopyable".

Could you show an example?

comment:2 follow-up: ↓ 3 Changed 4 years ago by viboes

Following the update to follow more closely C++0X delete operation, instead of inheriting from boost::noncopyable, we can replace by the explicit private constructors

private:

mutex(mutex const&); mutex& operator=(mutex const&);

See attachments.

Changed 4 years ago by viboes

Changed 4 years ago by viboes

Correct issue with thread_group default constructor on 4344.patch

comment:3 in reply to: ↑ 2 Changed 4 years ago by viboes

Replying to viboes:

See attachments.

Take 3244_2.patch, 3244.patch has a bug on thread_group default constructor.

comment:4 Changed 4 years ago by viboes

  • Type changed from Bugs to Patches

comment:5 Changed 4 years ago by anthonyw

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

Fixed on trunk.

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.