@@ -430,7 +430,8 @@ class kl_improver : public ImprovementScheduler<Graph_t> {
430430 std::vector<VertexType> quick_moves_stack;
431431 quick_moves_stack.reserve (10 + thread_data.active_schedule_data .new_violations .size () * 2 );
432432
433- for (const auto & [key, value] : thread_data.active_schedule_data .new_violations ) {
433+ for (const auto & key_value_pair : thread_data.active_schedule_data .new_violations ) {
434+ const auto &key = key_value_pair.first ;
434435 quick_moves_stack.push_back (key);
435436 }
436437
@@ -458,7 +459,8 @@ class kl_improver : public ImprovementScheduler<Graph_t> {
458459 if (thread_data.active_schedule_data .new_violations .size () > 0 ) {
459460 bool abort = false ;
460461
461- for (const auto & [key, value] : thread_data.active_schedule_data .new_violations ) {
462+ for (const auto & key_value_pair : thread_data.active_schedule_data .new_violations ) {
463+ const auto &key = key_value_pair.first ;
462464 if (local_lock.find (key) != local_lock.end ()) {
463465 abort = true ;
464466 break ;
@@ -545,7 +547,8 @@ class kl_improver : public ImprovementScheduler<Graph_t> {
545547 if (new_num_violations == 0 ) break ;
546548
547549 if (thread_data.active_schedule_data .new_violations .size () > 0 ) {
548- for (const auto & [vertex, edge] : thread_data.active_schedule_data .new_violations ) {
550+ for (const auto & vertex_edge_pair : thread_data.active_schedule_data .new_violations ) {
551+ const auto &vertex = vertex_edge_pair.first ;
549552 thread_data.affinity_table .insert (vertex);
550553 }
551554 }
@@ -720,7 +723,8 @@ class kl_improver : public ImprovementScheduler<Graph_t> {
720723
721724#ifdef KL_DEBUG
722725 std::cout << " recmopute max gain: {" ;
723- for (const auto [key, value] : recompute_max_gain) {
726+ for (const auto map_pair : recompute_max_gain) {
727+ const auto &key = map_pair.first ;
724728 std::cout << key << " , " ;
725729 }
726730 std::cout << " }" << std::endl;
@@ -833,7 +837,8 @@ class kl_improver : public ImprovementScheduler<Graph_t> {
833837
834838 inline bool blocked_edge_strategy (VertexType node, std::vector<VertexType> & unlock_nodes, ThreadSearchContext & thread_data) {
835839 if (thread_data.unlock_edge_backtrack_counter > 1 ) {
836- for (const auto [v,e] : thread_data.active_schedule_data .new_violations ) {
840+ for (const auto vertex_edge_pair : thread_data.active_schedule_data .new_violations ) {
841+ const auto &e = vertex_edge_pair.second ;
837842 const auto source_v = source (e, *graph);
838843 const auto target_v = target (e, *graph);
839844
@@ -958,7 +963,8 @@ class kl_improver : public ImprovementScheduler<Graph_t> {
958963 // thread_data.selection_strategy.add_neighbours_to_selection(node, thread_data.affinity_table, thread_data.start_step, thread_data.end_step);
959964 if (thread_data.active_schedule_data .new_violations .size () > 0 ) {
960965
961- for (const auto & [vertex, edge] : thread_data.active_schedule_data .new_violations ) {
966+ for (const auto & vertex_edge_pair : thread_data.active_schedule_data .new_violations ) {
967+ const auto &vertex = vertex_edge_pair.first ;
962968 thread_data.affinity_table .insert (vertex);
963969 }
964970 }
0 commit comments