[Boost-bugs] [Boost C++ Libraries] #12256: boost::container::set<std::pair<int, int>>::insert cause compilation error in debug configuration in Visual Studio 2012

Subject: [Boost-bugs] [Boost C++ Libraries] #12256: boost::container::set<std::pair<int, int>>::insert cause compilation error in debug configuration in Visual Studio 2012
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-06-08 10:47:56


#12256: boost::container::set<std::pair<int,int>>::insert cause compilation error
in debug configuration in Visual Studio 2012
------------------------------+-------------------------
 Reporter: anonymous | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
  Version: Boost 1.61.0 | Severity: Showstopper
 Keywords: |
------------------------------+-------------------------
 Here is the example code
 {{{
         boost::container::set<std::pair<int,int>> s;
         std::pair<int,int> p(0, 0);
         s.insert(p);
 }}}
 It outputs a several pages long template error starting as
 {{{
 1>...........\boost_1_61_0\boost/intrusive/detail/tree_value_compare.hpp(74):
 error C2664: 'const std::pair<_Ty1,_Ty2>
 &boost::move_detail::identity<T>::operator ()(const std::pair<_Ty1,_Ty2>
 &)' : cannot convert parameter 1 from 'const
 boost::container::container_detail::pair<T1,T2>' to 'const
 std::pair<_Ty1,_Ty2> &'
 1> with
 1> [
 1> _Ty1=int,
 1> _Ty2=int,
 1> T=std::pair<int,int>
 1> ]
 1> and
 1> [
 1> T1=int,
 1> T2=int
 1> ]
 1> and
 1> [
 1> _Ty1=int,
 1> _Ty2=int
 1> ]
 1> Reason: cannot convert from 'const
 boost::container::container_detail::pair<T1,T2>' to 'const
 std::pair<_Ty1,_Ty2>'
 ................................
 }}}


 Same code compiles correctly in release configuration.
 And it compiles correctly in boost 1.59 in all configurations.

 Marking it as Showstopper as it breaks a lot of our code.

 To reproduce - create a new VS2012 project with default settings.
 I didn't test it on other versions of Visual Studio.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12256>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC