Skip to content

Commit ce63dac

Browse files
authored
Merge pull request #31 from steiltre/bugfix/build_all_examples
Fixes example/map_set.cpp to compile and adds to CMake
2 parents 6b1ff96 + 03baa06 commit ce63dac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ add_mpi_omp_example(bag_insert_rate)
4646
add_mpi_omp_example(word_counter)
4747
add_mpi_omp_example(lambda_optional_arguments)
4848
add_mpi_omp_example(map_visit_optional_arguments)
49+
add_mpi_omp_example(map_set)

examples/map_set.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
int main(int argc, char** argv) {
1111
ygm::comm world(&argc, &argv);
1212

13-
ygm::container::set<std::string> str_set(world);
13+
ygm::container::set<std::string> str_set(world);
1414
ygm::container::map<std::string, std::string> str_map(world);
1515

1616
if (world.rank() == 0) {
@@ -25,11 +25,10 @@ int main(int argc, char** argv) {
2525
str_map.async_set("strawberry", "raspberry");
2626
}
2727

28-
str_set.all_for_all(
29-
[](auto k) { std::cout << "str_set: " << k << std::endl; });
28+
str_set.for_all([](auto k) { std::cout << "str_set: " << k << std::endl; });
3029

3130
str_map.for_all([](auto kv) {
3231
std::cout << "str_map: " << kv.first << " -> " << kv.second << std::endl;
3332
});
3433
return 0;
35-
}
34+
}

0 commit comments

Comments
 (0)