From e69120bf13113d7e5cc5fe23df723cacc89d9b17 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 7 Sep 2021 02:09:28 +0100 Subject: Update to C++20 for constexpr virtual destructors --- Jamroot.jam | 2 +- slicer/test/preprocessor.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jamroot.jam b/Jamroot.jam index d9e20c7..7910d73 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -11,7 +11,7 @@ variant coverage : debug ; project : requirements ICE_CPP11_MAPPING - 17 + 20 hidden "-Wl,-z,defs,--warn-once,--gc-sections" release:on diff --git a/slicer/test/preprocessor.cpp b/slicer/test/preprocessor.cpp index 72afa63..506eb1e 100644 --- a/slicer/test/preprocessor.cpp +++ b/slicer/test/preprocessor.cpp @@ -18,8 +18,8 @@ unsigned int total() { const auto t = std::accumulate( - COMPONENTS_IN_TEST_ICE.begin(), COMPONENTS_IN_TEST_ICE.end(), 0U, [](auto & t, auto && c) { - return t += c.second; + COMPONENTS_IN_TEST_ICE.begin(), COMPONENTS_IN_TEST_ICE.end(), 0U, [](const auto & t, const auto & c) { + return t + c.second; }); BOOST_CHECK_EQUAL(49, t); return t; -- cgit v1.2.3