Modify

Ticket #12534 (closed Bugs: fixed)

Opened 3 months ago

Last modified 2 months ago

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

Reported by: eurokang@… Owned by: igaztanaga
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

Change History

comment:1 Changed 2 months ago by lars@…

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

comment:2 Changed 2 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 2 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 2 months ago by igaztanaga

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

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

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.