From 05c05f53c050e6bc2b4b7616993ac864932b45d6 Mon Sep 17 00:00:00 2001 From: greg Date: Fri, 16 Oct 2020 23:06:39 -0400 Subject: [PATCH] compilation issue --- tests/parallel_hash_map_test.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/parallel_hash_map_test.cc b/tests/parallel_hash_map_test.cc index cdef5b9..34d32be 100644 --- a/tests/parallel_hash_map_test.cc +++ b/tests/parallel_hash_map_test.cc @@ -41,13 +41,19 @@ TEST(THIS_TEST_NAME, ThreadSafeContains) { EXPECT_EQ(m[4], 999); // insert a value that is not already present. - m.lazy_emplace_l(5, [](int& v) { assert(0); /* should not be called when value constructed */ v = 6; }, [](const auto& ctor) { ctor(5, 13); }); + m.lazy_emplace_l(5, + [](int& v) { assert(0); /* should not be called when value constructed */ v = 6; }, + [](const auto& ctor) { ctor(5, 13); }); + EXPECT_EQ(m[5], 13); +#if PHMAP_HAVE_CC17 // generic lambda // change a value that is present - m.lazy_emplace_l(5, [](int& v) { v = 6; }, [](const auto& ctor) { assert(0); /* should not be called when value exists */ctor(5, 13); }); + m.lazy_emplace_l(5, + [](int& v) { v = 6; }, + [](const auto& ctor) { assert(0); /* should not be called when value exists */ctor(5, 13); }); EXPECT_EQ(m[5], 6); - +#endif }