mirror of
https://github.com/boostorg/container.git
synced 2025-08-04 06:54:27 +02:00
Remove usage of C++11 features.
This commit is contained in:
@@ -581,13 +581,13 @@ struct with_lookup_by_first
|
|||||||
|
|
||||||
bool test_heterogeneous_lookup_by_partial_key()
|
bool test_heterogeneous_lookup_by_partial_key()
|
||||||
{
|
{
|
||||||
flat_map<std::pair<int, int>,int, with_lookup_by_first> const map1
|
typedef flat_map<std::pair<int, int>,int, with_lookup_by_first> map_t;
|
||||||
{
|
|
||||||
{{0, 1}, 3},
|
|
||||||
{{0, 2}, 3},
|
|
||||||
};
|
|
||||||
|
|
||||||
auto const first_0_range = map1.equal_range(0);
|
map_t map1;
|
||||||
|
map1[std::pair<int, int>(0, 1)] = 3;
|
||||||
|
map1[std::pair<int, int>(0, 2)] = 3;
|
||||||
|
|
||||||
|
std::pair<map_t::iterator, map_t::iterator> const first_0_range = map1.equal_range(0);
|
||||||
|
|
||||||
return 2 == first_0_range.second - first_0_range.first;
|
return 2 == first_0_range.second - first_0_range.first;
|
||||||
}
|
}
|
||||||
|
@@ -597,13 +597,13 @@ struct with_lookup_by_first
|
|||||||
|
|
||||||
bool test_heterogeneous_lookup_by_partial_key()
|
bool test_heterogeneous_lookup_by_partial_key()
|
||||||
{
|
{
|
||||||
flat_set<std::pair<int, int>, with_lookup_by_first> const set1
|
typedef flat_set<std::pair<int, int>, with_lookup_by_first> set_t;
|
||||||
{
|
|
||||||
{0, 1},
|
|
||||||
{0, 2},
|
|
||||||
};
|
|
||||||
|
|
||||||
auto const first_0_range = set1.equal_range(0);
|
set_t set1;
|
||||||
|
set1.insert(std::pair<int, int>(0, 1));
|
||||||
|
set1.insert(std::pair<int, int>(0, 2));
|
||||||
|
|
||||||
|
std::pair<set_t::iterator, set_t::iterator> const first_0_range = set1.equal_range(0);
|
||||||
|
|
||||||
return 2 == first_0_range.second - first_0_range.first;
|
return 2 == first_0_range.second - first_0_range.first;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user