diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-04-09 17:23:27 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-04-09 17:23:27 +0100 |
commit | 19271f5aad0baac263f257eb1391b8523f586553 (patch) | |
tree | f7f89b29a5c5d7a89f4ead54f54784e333296abf | |
parent | Update Doxygen config (diff) | |
download | libadhocutil-19271f5aad0baac263f257eb1391b8523f586553.tar.bz2 libadhocutil-19271f5aad0baac263f257eb1391b8523f586553.tar.xz libadhocutil-19271f5aad0baac263f257eb1391b8523f586553.zip |
Fix includes for modern gcc
-rw-r--r-- | libadhocutil/cache.impl.h | 1 | ||||
-rw-r--r-- | libadhocutil/scopeExit.cpp | 1 | ||||
-rw-r--r-- | libadhocutil/unittests/testCache.cpp | 1 | ||||
-rw-r--r-- | libadhocutil/unittests/testLocks.cpp | 9 |
4 files changed, 8 insertions, 4 deletions
diff --git a/libadhocutil/cache.impl.h b/libadhocutil/cache.impl.h index 5200bce..d05824f 100644 --- a/libadhocutil/cache.impl.h +++ b/libadhocutil/cache.impl.h @@ -4,6 +4,7 @@ #include "cache.h" #include "lockHelpers.h" #include <boost/lambda/lambda.hpp> +#include <mutex> #include <shared_mutex> namespace AdHoc { diff --git a/libadhocutil/scopeExit.cpp b/libadhocutil/scopeExit.cpp index 7384a66..1eb3511 100644 --- a/libadhocutil/scopeExit.cpp +++ b/libadhocutil/scopeExit.cpp @@ -1,4 +1,5 @@ #include "scopeExit.h" +#include <stdexcept> namespace AdHoc { diff --git a/libadhocutil/unittests/testCache.cpp b/libadhocutil/unittests/testCache.cpp index fe21868..8fa384c 100644 --- a/libadhocutil/unittests/testCache.cpp +++ b/libadhocutil/unittests/testCache.cpp @@ -4,6 +4,7 @@ #include "cache.h" #include "cache.impl.h" #include <functional> +#include <mutex> // NOLINTNEXTLINE(hicpp-special-member-functions) class Obj { diff --git a/libadhocutil/unittests/testLocks.cpp b/libadhocutil/unittests/testLocks.cpp index a7a506a..4e439a4 100644 --- a/libadhocutil/unittests/testLocks.cpp +++ b/libadhocutil/unittests/testLocks.cpp @@ -2,6 +2,7 @@ #include <boost/test/unit_test.hpp> #include "lockHelpers.h" +#include <mutex> #include <shared_mutex> BOOST_AUTO_TEST_CASE(lock) @@ -9,7 +10,7 @@ BOOST_AUTO_TEST_CASE(lock) std::shared_mutex _lock; { Lock(_lock); - BOOST_CHECK(_lck11.owns_lock()); + BOOST_CHECK(_lck12.owns_lock()); BOOST_CHECK(!_lock.try_lock()); BOOST_CHECK(!_lock.try_lock_shared()); } @@ -24,7 +25,7 @@ BOOST_AUTO_TEST_CASE(sharedlock) std::shared_mutex _lock; { SharedLock(_lock); - BOOST_CHECK(_lck26.owns_lock()); + BOOST_CHECK(_lck27.owns_lock()); BOOST_CHECK(!_lock.try_lock()); BOOST_CHECK(_lock.try_lock_shared()); _lock.unlock_shared(); @@ -39,7 +40,7 @@ BOOST_AUTO_TEST_CASE(scopelock) { std::shared_mutex _lock; ScopeLock(_lock) { - BOOST_CHECK(_lck41.owns_lock()); + BOOST_CHECK(_lck42.owns_lock()); BOOST_CHECK(!_lock.try_lock()); BOOST_CHECK(!_lock.try_lock_shared()); } @@ -53,7 +54,7 @@ BOOST_AUTO_TEST_CASE(sharedscopelock) { std::shared_mutex _lock; SharedScopeLock(_lock) { - BOOST_CHECK(_lck55.owns_lock()); + BOOST_CHECK(_lck56.owns_lock()); BOOST_CHECK(!_lock.try_lock()); BOOST_CHECK(_lock.try_lock_shared()); _lock.unlock_shared(); |