Opened 13 years ago

Closed 12 years ago

#3244 closed Patches (fixed)

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

Reported by: Ioannis Papadopoulos <ipapadop@…> Owned by: Anthony Williams
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 (2)

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

Download all attachments as: .zip

Change History (7)

in reply to:  description comment:1 by viboes, 13 years ago

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 by viboes, 12 years ago

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.

by viboes, 12 years ago

Attachment: 3244.patch added

by viboes, 12 years ago

Attachment: 3244_2.patch added

Correct issue with thread_group default constructor on 4344.patch

in reply to:  2 comment:3 by viboes, 12 years ago

Replying to viboes:

See attachments.

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

comment:4 by viboes, 12 years ago

Type: BugsPatches

comment:5 by Anthony Williams, 12 years ago

Resolution: fixed
Status: newclosed

Fixed on trunk.

Note: See TracTickets for help on using tickets.