Add missing initializer list overload taking an additional allocator.

This commit is contained in:
Ion Gaztañaga committed 2015-02-28 23:46:08 +01:00
1 parent 8db0f4ad64
commit d39b1c143c
7 files changed
+136 -42

No files matched your search

+4 -32
View File
@@ -663,39 +663,7 @@ int map_test()
}
return 0;
}
/*
template<typename MapType>
bool test_support_for_initialization_list_for()
{
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
const std::initializer_list<std::pair<const int, int>> il
= {std::make_pair(1, 2), std::make_pair(3, 4)};
const MapType expected(il.begin(), il.end());
{
const MapType sil = il;
if (sil != expected)
return false;
const MapType sil_ordered(ordered_unique_range, il);
if(sil_ordered != expected)
return false;
MapType sil_assign = {std::make_pair(99, 100)};
sil_assign = il;
if(sil_assign != expected)
return false;
}
{
MapType sil;
sil.insert(il);
if(sil != expected)
return false;
}
return true;
#endif
return true;
}
*/
template<typename MapType>
bool test_map_support_for_initialization_list_for()
{
@@ -713,6 +681,10 @@ bool test_map_support_for_initialization_list_for()
if (sila != expected)
return false;
MapType silca(il, typename MapType::key_compare(), typename MapType::allocator_type());
if (silca != expected)
return false;
const MapType sil_ordered(ordered_unique_range, il);
if (sil_ordered != expected)
return false;