1+
12// ////////////////////////////////////////////////////////////////////////////
23//
34// (C) Copyright Ion Gaztanaga 2004-2013. Distributed under the Boost
@@ -346,14 +347,14 @@ bool constructor_template_auto_deduction_test()
346347
347348}}} // boost::container::test
348349
349- template <class VoidAllocator , boost::container::tree_type_enum tree_type_value>
350+ template <class VoidAllocator , boost::container::tree_type_enum tree_type_value, bool Transparent = false >
350351struct GetAllocatorSet
351352{
352353 template <class ValueType >
353354 struct apply
354355 {
355356 typedef set < ValueType
356- , std::less<ValueType>
357+ , typename dtl::if_c<Transparent, test::less_transparent, std::less<ValueType> >::type
357358 , typename allocator_traits<VoidAllocator>
358359 ::template portable_rebind_alloc<ValueType>::type
359360 , typename boost::container::tree_assoc_options
@@ -362,7 +363,7 @@ struct GetAllocatorSet
362363 > set_type;
363364
364365 typedef multiset < ValueType
365- , std::less<ValueType>
366+ , typename dtl::if_c<Transparent, test::less_transparent, std::less<ValueType> >::type
366367 , typename allocator_traits<VoidAllocator>
367368 ::template portable_rebind_alloc<ValueType>::type
368369 , typename boost::container::tree_assoc_options
@@ -504,6 +505,24 @@ int main ()
504505 std::cout << " Error in set_test<new_allocator<void>, red_black_tree>" << std::endl;
505506 return 1 ;
506507 }
508+
509+ if (0 != test::set_test
510+ < GetAllocatorSet<new_allocator<void >, red_black_tree>::apply<test::moveconstruct_int>::set_type
511+ , MyStdSet
512+ , GetAllocatorSet<new_allocator<void >, red_black_tree>::apply<test::moveconstruct_int>::multiset_type
513+ , MyStdMultiSet>()) {
514+ std::cout << " Error in set_test<new_allocator<void>, red_black_tree>" << std::endl;
515+ return 1 ;
516+ }
517+
518+ if (0 != test::set_test
519+ < GetAllocatorSet<new_allocator<void >, red_black_tree, true >::apply<test::movable_and_copyable_int>::set_type
520+ , MyStdSet
521+ , GetAllocatorSet<new_allocator<void >, red_black_tree, true >::apply<test::movable_and_copyable_int>::multiset_type
522+ , MyStdMultiSet>()) {
523+ std::cout << " Error in set_test<new_allocator<void>, red_black_tree>>, transparent" << std::endl;
524+ return 1 ;
525+ }
507526 }
508527
509528 // //////////////////////////////////
@@ -621,3 +640,17 @@ int main ()
621640
622641 return 0 ;
623642}
643+
644+ /*
645+ #include <boost/container/set.hpp>
646+ #include <functional>
647+
648+ int main()
649+ {
650+ using set = boost::container::set<int, std::less<>>;
651+
652+ set s;
653+ const set cs;
654+ s.insert(cs.begin(), cs.end());
655+ }
656+ */
0 commit comments