Hi all,

Any news from the boost package maintainers for this bug ?

A patch is available for this bug (see attachement)
and it should be easy to fix it now.

It affects the Rheolef package: there is a BinNMU issue still pending.

Many thanks for your help and reactivity,

Pierre
--
pierre.saram...@imag.fr
Directeur de Recherche CNRS
Laboratoire Jean Kuntzmann, Grenoble, France
http://ljk.imag.fr/membres/Pierre.Saramito
// bug description
// https://svn.boost.org/trac10/ticket/12534
// and its fix in boost-dev 1.65:
// https://github.com/boostorg/container/commit/5e4a107e82ab3281688311d22d2bfc2fddcf84a3
// i.e. remove from line 431 to 460 in include/boost/container/detail/pair.hpp

#undef FIX_BUG
#ifdef  FIX_BUG
#include <boost/container/map.hpp>
#endif // FIX_BUG

#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;

int main() {}
*** /usr/include/boost/container/detail/pair.hpp.orig	Tue Dec 12 12:15:26 2017
--- /usr/include/boost/container/detail/pair.hpp	Tue Dec 12 12:41:22 2017
***************
*** 416,451 ****
  }  //namespace container_detail {
  }  //namespace container {
  
- 
- //Without this specialization recursive flat_(multi)map instantiation fails
- //because is_enum needs to instantiate the recursive pair, leading to a compilation error).
- //This breaks the cycle clearly stating that pair is not an enum avoiding any instantiation.
- template<class T>
- struct is_enum;
- 
- template<class T, class U>
- struct is_enum< ::boost::container::container_detail::pair<T, U> >
- {
-    static const bool value = false;
- };
- 
- template<class T, class U>
- struct is_enum< ::std::pair<T, U> >
- {
-    static const bool value = false;
- };
- 
- template <class T>
- struct is_class;
- 
- //This specialization is needed to avoid instantiation of pair in
- //is_class, and allow recursive maps.
- template <class T1, class T2>
- struct is_class< ::boost::container::container_detail::pair<T1, T2> >
- {
-    static const bool value = true;
- };
- 
  #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
  
  template<class T1, class T2>
--- 416,421 ----

Reply via email to