Opened 10 years ago

Closed 10 years ago

#6969 closed Bugs (worksforme)

Compilation fails with incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>

Reported by: Trystan Larey-Williams <trystan@…> Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.48.0 Severity: Regression
Keywords: Cc:

Description

OS: Fedora 17 GCC: g++ (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5)

Attached is a small code snippet that fails to compile on the system specs listed above. It compiled successfully prior to upgrading from F16 -> F17 (I believe both gcc and boost were upgraded).

The code and the resulting console errors are attached.

Attachments (2)

test.cpp (1008 bytes ) - added by Trystan Larey-Williams <trystan@…> 10 years ago.
errors.txt (2.9 KB ) - added by Trystan Larey-Williams <trystan@…> 10 years ago.

Download all attachments as: .zip

Change History (3)

by Trystan Larey-Williams <trystan@…>, 10 years ago

Attachment: test.cpp added

by Trystan Larey-Williams <trystan@…>, 10 years ago

Attachment: errors.txt added

comment:1 by Ion Gaztañaga, 10 years ago

Resolution: worksforme
Status: newclosed

I think the assertion gives you the hint:

Allocator type must be std::pair<CONST Key, T> BOOST_STATIC_ASSERT((container_detail::is_same<std::pair<const Key, T>, typename A::value_type>::value));

You are not using CONST for allocator pair first param and this is required also for std::map. New boost version added this check to detect the error early. Change your code to:

typedef boost::interprocess::pair<const unsigned int, unsigned int> MyPair;

Note: See TracTickets for help on using tickets.