Modify

#12534 closed Bugs (fixed)

flat_map fails to compile if included after type_traits is instantiated under gcc.

Reported by: eurokang@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.62.0 Severity: Regression
Keywords: Cc:

Description

Compiler gcc-5.4.0.

#include <boost/type_traits.hpp>

static const bool is_enum = boost::is_enum<std::pair<int, int> >::value;

#include <boost/container/flat_map.hpp>

boost::container::flat_map<int, int> m;

error is:

/boost/boost/container/detail/pair.hpp:433:8: error: partial specialization of ‘struct boost::is_enum<std::pair<_T1, _T2> >’ after instantiation of ‘struct boost::is_enum<std::pair<int, int> >’ [-fpermissive]

Version 1.59.0 compiles fine.

Attachments (0)

Change History (4)

comment:1 Changed 11 months ago by lars@…

I'm being bitten by this as well. Anyone have a fix?

comment:2 Changed 11 months ago by lars@…

I've managed to fix it in my code base by add an include of boost/container/map.hpp early in the include chain.

comment:3 Changed 11 months ago by matt@…

This affects us too. We don't have the flexibility to reorder header inclusions under all circumstances, so this is a pretty severe break for us.

comment:4 Changed 11 months ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

Thanks for the report. Those partial specializations are not longer needed so they are removed in the commit:

https://github.com/boostorg/container/commit/5e4a107e82ab3281688311d22d2bfc2fddcf84a3

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.