Lines Matching full:auto
189 …for (auto &&entry : map) PetscCallCXX(oss << " key: [" << this->key_printer(entry.first) << "] … in view_map()
205 const auto msize = map.size(); in check_size_capacity_coherent()
206 const auto mcap = map.capacity(); in check_size_capacity_coherent()
228 auto key = key_type{}; in test_insert()
229 auto value = mapped_type{}; in test_insert()
230 auto size_before = map.size(); in test_insert()
231 auto capacity_before = map.capacity(); in test_insert()
233 const auto check_all_reinsert = [&](value_type &key_value) { in test_insert()
235 auto &key = key_value.first; in test_insert()
236 auto &value = key_value.second; in test_insert()
237 const auto key_const = key; in test_insert()
238 const auto value_const = value; in test_insert()
239 const auto pair = std::make_pair(key_const, value_const); in test_insert()
240 const auto check_reinsert = [&](const char op[], const insert_return_type &ret) { in test_insert()
283 …const auto test_map_contains_expected_items = [&](std::function<PetscErrorCode(std::vector<value_t… in test_insert()
284 auto key_value_pairs = this->make_key_values(kv_size); in test_insert()
296 for (auto it = map.cbegin(); it != map.cend(); ++it) { in test_insert()
297 const auto kv_begin = key_value_pairs.cbegin(); in test_insert()
298 const auto found = std::lower_bound(kv_begin, key_value_pairs.cend(), *it); in test_insert()
299 const auto dist = std::distance(kv_begin, found); in test_insert()
321 for (auto &&key_value : key_value_pairs) { in test_insert()
352 auto it = map.find(saved_value.first); in test_insert()
375 const auto sample_values = this->make_key_values(145); in test_find()
378 for (auto &&kv : sample_values) { in test_find()
379 auto &&key = kv.first; in test_find()
380 auto &&value = kv.second; in test_find()
381 auto it = map.find(key); in test_find()
390 const auto range = map.equal_range(key); in test_find()
391 const auto &range_begin = range.first; in test_find()
392 const auto range_size = std::distance(range_begin, range.second); in test_find()
414 auto sample_values = this->make_key_values(57); in test_erase()
416 const auto check_map_is_truly_empty = [&](map_type &map) { in test_erase()
421 …for (auto it = map.begin(); it != map.end(); ++it) MapCheck(map, false, PETSC_COMM_SELF, PETSC_ERR… in test_erase()
429 const auto it = map.begin(); in test_erase()
430 const auto begin_key = it->first; in test_erase()
431 const auto begin_val = it->second; in test_erase()
434 …for (auto &&kv : map) MapCheck(map, kv.first != begin_key, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Erasi… in test_erase()
440 for (auto it = map.begin(); it != map.end(); ++it) { in test_erase()
441 const auto before = it; in test_erase()
481 for (auto &&kv : sample_values) PetscCallCXX(map.emplace(kv.first, kv.second)); in test_erase()
504 for (auto &&kv : sample_values) PetscCallCXX(map.erase(kv.first)); in test_erase()
518 // stupid dummy function because auto-lambdas are C++14
523 constexpr auto is_normal = std::is_same<It, typename map_type::iterator>::value; in test_iterators()
524 constexpr auto is_const = std::is_same<It, typename map_type::const_iterator>::value; in test_iterators()
574 const auto sample_values = this->make_key_values(97); in test_misc()
581 const auto backup = map; in test_misc()
582 auto map_copy = map; in test_misc()
583 const auto check_original_map_did_not_change = [&](const char op[]) { in test_misc()
601 auto moved_copy = std::move(map_copy); in test_misc()
658 const auto int_printer = [](int key, std::string &buf) { in main()
663 const auto double_printer = [](double value, std::string &buf) { in main()
668 const auto foo_printer = [](const Foo &key, std::string &buf) { in main()
673 const auto bar_printer = [](const Bar &value, std::string &buf) { in main()
678 const auto pair_printer = [](const std::pair<int, double> &value, std::string &buf) { in main()
685 const auto make_int = [&] { in main()
692 const auto make_double = [&] { in main()
699 const auto make_foo = [&] { in main()
701 auto ret = Foo{make_int(), make_double()}; in main()
704 const auto make_bar = [&] { in main()
706 const auto isize = std::abs(make_int()); in main()
711 auto ret = Bar{std::move(x), std::to_string(isize)}; in main()
715 const auto int_double_generator = [&] { return std::make_pair(make_int(), make_double()); }; in main()
719 const auto int_foo_generator = [&] { return std::make_pair(make_int(), make_foo()); }; in main()
722 const auto foo_bar_generator = [&] { return std::make_pair(make_foo(), make_bar()); }; in main()
728 const auto pair_pair_generator = [&] { in main()
729 auto pair = std::make_pair(make_int(), make_double()); in main()