diff --git a/apps/WorkerSleepExample.cpp b/apps/WorkerSleepExample.cpp index 91cdfc7f772c465cc2650de4153d563ae33cf771..3d1379de773174164816353667dbfe5c36445ed5 100644 --- a/apps/WorkerSleepExample.cpp +++ b/apps/WorkerSleepExample.cpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: LGPL-3.0-or-later // Copyright © 2020 Florian Schmaus #include <chrono> // for milliseconds, operator+, hig... +#include <compare> // for operator<, strong_ordering #include <cstdlib> // for exit, EXIT_SUCCESS #include <iostream> // for operator<<, basic_ostream, endl #include <ratio> // for ratio @@ -25,6 +26,9 @@ static void letsGetBusy(std::chrono::duration<Rep, Period> duration) { std::chrono::high_resolution_clock::now(); const std::chrono::time_point<std::chrono::high_resolution_clock> deadline = now + duration; + // TODO: The suppressed linter error below may be a false positive + // reported by clang-tidy. + // NOLINTNEXTLINE(modernize-use-nullptr) while (std::chrono::high_resolution_clock::now() < deadline) ; } diff --git a/emper/Scheduler.hpp b/emper/Scheduler.hpp index bec6efd465b7dd67da1587f8ffa2cca7132c1849..eaff0de45b110c4ee5efab2151b83e4683022080 100644 --- a/emper/Scheduler.hpp +++ b/emper/Scheduler.hpp @@ -2,7 +2,6 @@ // Copyright © 2020 Florian Schmaus #pragma once -#include <algorithm> // for copy, copy_backward #include <functional> // for function #include "CallerEnvironment.hpp" diff --git a/meson.build b/meson.build index 21542a070b9e8a829ae1548b86c97282e5749d81..171758036d0a285302bff33208ac97c19e1ed110 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,7 @@ project('EMPER', 'c', 'cpp', default_options : [ 'warning_level=3', 'c_std=gnu11', - 'cpp_std=c++17', + 'cpp_std=c++2a', 'b_ndebug=if-release', 'werror=true', ]) diff --git a/tests/AlarmActorTest.cpp b/tests/AlarmActorTest.cpp index f54bc178005b053580c9cf7240f48d767ef7bc91..bb57ecbfe95a3922701583cf1be28c6e5ccfed44 100644 --- a/tests/AlarmActorTest.cpp +++ b/tests/AlarmActorTest.cpp @@ -1,6 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-or-later // Copyright © 2020 Florian Fischer -#include <algorithm> // for copy #include <cstdlib> // for exit, EXIT_FAILURE, EXIT_SUC... #include <functional> // bind #include <iostream> // for operator<<, basic_ostream diff --git a/tests/SimpleActorTest.cpp b/tests/SimpleActorTest.cpp index 7481b85384f00f2268b6462d328a9015bc1c97d9..7f428af43e13726b815e1c5b45421aadba0adde1 100644 --- a/tests/SimpleActorTest.cpp +++ b/tests/SimpleActorTest.cpp @@ -1,6 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-or-later // Copyright © 2020 Florian Schmaus -#include <algorithm> // for copy #include <atomic> // for atomic_thread_fence, memory_... #include <cstdint> // for uint64_t #include <cstdlib> // for exit, EXIT_FAILURE, EXIT_SUC... @@ -27,7 +26,7 @@ class SumActor : public Actor<uint64_t> { SumActor(Runtime& runtime) : Actor(runtime) {} [[nodiscard]] auto getSum() const -> uint64_t { - std::atomic_thread_fence(std::memory_order::memory_order_acquire); + std::atomic_thread_fence(std::memory_order_acquire); return sum; } diff --git a/tests/TellActorFromAnywhereTest.cpp b/tests/TellActorFromAnywhereTest.cpp index dd821ec2def8c43694c3dd3a09d12bca8d942dd7..4f535657e29a7a152cd2efa9152c1f1308983a4e 100644 --- a/tests/TellActorFromAnywhereTest.cpp +++ b/tests/TellActorFromAnywhereTest.cpp @@ -1,6 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-or-later // Copyright © 2020 Florian Schmaus -#include <algorithm> // for copy, copy_backward #include <cstdlib> // for exit, EXIT_FAILURE, EXIT_SUCCESS #include <functional> // for bind #include <thread>