Modify

Ticket #4317 (closed Patches: fixed)

Opened 4 years ago

Last modified 4 years ago

test_generic_locks.cpp doesn't compiles any more on gcc3.4 cygwin

Reported by: viboes Owned by: anthonyw
Milestone: Boost 1.44.0 Component: thread
Version: Boost Development Trunk Severity: Regression
Keywords: Cc:

Description

After modification on the locks algorithm, test_generic_locks.cpp doesn't compiles any more on gcc3.4 cygwin.

gcc.compile.c++ ../../../bin.v2/libs/thread/test/test_generic_locks.test/gcc-3.4.4/debug/threading-multi/test_generic_locks.o ../../../boost/thread/locks.hpp: In instantiation of `boost::detail::has_member_called_try_lock<dummy_iterator, true>::derived': ../../../boost/thread/locks.hpp:65: instantiated from `boost::detail::has_member_called_try_lock<dummy_iterator, true>' ../../../boost/thread/locks.hpp:145: instantiated from `boost::is_mutex_type<dummy_iterator>' ../../../boost/thread/locks.hpp:1280: instantiated from `void boost::lock(const MutexType1&, const MutexType2&) [with MutexType1 = dummy_iterator, MutexType2 = dummy_iterator]' test_generic_locks.cpp:356: instantiated from here ../../../boost/thread/locks.hpp:65: error: base `dummy_iterator' with only non-default constructor in class without a constructor

Attachments

4317.patch Download (364 bytes) - added by viboes 4 years ago.

Change History

comment:1 Changed 4 years ago by viboes

The dummy_iterator default constructor is missing:

    dummy_iterator(): p(0) {}

Changed 4 years ago by viboes

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

Adding a constructor to dummy_iterator will just mask the issue. The "derived" class in question has no instances, so we can just declare an unimplemented default constructor to stop the compiler complaining.

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.