Opened 7 years ago

Closed 7 years ago

#4317 closed Patches (fixed)

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:


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 (1)

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

Download all attachments as: .zip

Change History (4)

comment:1 Changed 7 years ago by viboes

The dummy_iterator default constructor is missing:

    dummy_iterator(): p(0) {}

Changed 7 years ago by viboes

comment:2 Changed 7 years ago by viboes

  • Type changed from Bugs to Patches

comment:3 Changed 7 years ago by anthonyw

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

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.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain anthonyw.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.