Opened 12 years ago

Closed 12 years ago

#4317 closed Patches (fixed)

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

Reported by: viboes Owned by: Anthony Williams
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 (1)

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

Download all attachments as: .zip

Change History (4)

comment:1 by viboes, 12 years ago

The dummy_iterator default constructor is missing:

    dummy_iterator(): p(0) {}

by viboes, 12 years ago

Attachment: 4317.patch added

comment:2 by viboes, 12 years ago

Type: BugsPatches

comment:3 by Anthony Williams, 12 years ago

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.