Modify

#12256 closed Bugs (fixed)

boost::container::set<std::pair<int,int>>::insert cause compilation error in debug configuration in Visual Studio 2012

Reported by: anonymous Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.61.0 Severity: Showstopper
Keywords: Cc:

Description

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.

Attachments (1)

boost_1.61.0_bug_1.7z (5.0 KB) - added by anonymous 16 months ago.
VS2012 project to reproduce error

Download all attachments as: .zip

Change History (2)

Changed 16 months ago by anonymous

Attachment: boost_1.61.0_bug_1.7z added

VS2012 project to reproduce error

comment:1 Changed 14 months ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

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.