Opened 10 years ago

Closed 10 years ago

#7052 closed Bugs (fixed)

Thread: BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 only masks thread::operator==, thread::operator!= forward declarations, not definitions

Reported by: pekka.seppanen@… Owned by: viboes
Milestone: Boost 1.51.0 Component: thread
Version: Boost 1.50.0 Severity: Problem
Keywords: thread BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 thread::operator== thread::operator!= Cc:

Description

If BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 is not defined, it only masks thread::operator== and thread::operator!= declarations at boost/thread/detail/thread.hpp:411-416 but not the actual definitions at lines 585-593.

This naturally leads to a compile error, as we're trying to define operators are not declared.

Attached a proposed patch. Simply adds the same define guard around the definitions.

Attachments (1)

boost_1_50_0_thread_no_depr_feat_v3.patch (480 bytes ) - added by pekka.seppanen@… 10 years ago.
Do not define thread::operator== and thread::operator!= unless deprecated features are explicitly requested.

Download all attachments as: .zip

Change History (3)

by pekka.seppanen@…, 10 years ago

Do not define thread::operator== and thread::operator!= unless deprecated features are explicitly requested.

comment:1 by viboes, 10 years ago

Milestone: To Be DeterminedBoost 1.51.0
Owner: changed from Anthony Williams to viboes
Status: newassigned

Thanks for the report and the patch. I don't know why the regression tests don't catch the error.

Just for curiosity, what compiler are you using? Could you attach the example and the command line that show the error?

Committed in trunk revision 79237.

comment:2 by viboes, 10 years ago

Resolution: fixed
Status: assignedclosed

Committed revision 79373.

Note: See TracTickets for help on using tickets.