diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-26 18:58:55 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-26 18:58:58 +0100 |
commit | fcabff5702fd00d575f1f214bf9b6ced037be53b (patch) | |
tree | 8de3d56ba8785c568e3f84bc5d14be29af5d25bb /src/utils/cpp | |
parent | 527e5d552b64c00f4af27007c37de5bf8f100c80 (diff) | |
download | justbuild-fcabff5702fd00d575f1f214bf9b6ced037be53b.tar.gz |
Add missing system includes
Main culprits:
- std::size_t, std::nullptr_t, and NULL require <cstddef>
- std::move and std::forward require <utility>
- unordered maps and sets require respective includes
- std::for_each and std::all_of require <algorithm>
Diffstat (limited to 'src/utils/cpp')
-rw-r--r-- | src/utils/cpp/atomic.hpp | 1 | ||||
-rw-r--r-- | src/utils/cpp/concepts.hpp | 1 | ||||
-rw-r--r-- | src/utils/cpp/file_locking.hpp | 1 | ||||
-rw-r--r-- | src/utils/cpp/hash_combine.hpp | 2 | ||||
-rw-r--r-- | src/utils/cpp/json.hpp | 1 | ||||
-rw-r--r-- | src/utils/cpp/path_hash.hpp | 1 |
6 files changed, 7 insertions, 0 deletions
diff --git a/src/utils/cpp/atomic.hpp b/src/utils/cpp/atomic.hpp index bc2a7865..13dc8ca9 100644 --- a/src/utils/cpp/atomic.hpp +++ b/src/utils/cpp/atomic.hpp @@ -18,6 +18,7 @@ #include <atomic> #include <condition_variable> #include <shared_mutex> +#include <utility> // std::move // Atomic wrapper with notify/wait capabilities. // TODO(modernize): Replace any use this class by C++20's std::atomic<T>, once diff --git a/src/utils/cpp/concepts.hpp b/src/utils/cpp/concepts.hpp index 167c6551..548fb960 100644 --- a/src/utils/cpp/concepts.hpp +++ b/src/utils/cpp/concepts.hpp @@ -16,6 +16,7 @@ #define INCLUDED_SRC_UTILS_CPP_CONCEPTS_HPP #include <chrono> +#include <cstddef> #include <string> #include <type_traits> diff --git a/src/utils/cpp/file_locking.hpp b/src/utils/cpp/file_locking.hpp index 24aeb90b..f8ac1443 100644 --- a/src/utils/cpp/file_locking.hpp +++ b/src/utils/cpp/file_locking.hpp @@ -18,6 +18,7 @@ #include <filesystem> #include <memory> #include <optional> +#include <utility> // std::move #include "gsl/gsl" diff --git a/src/utils/cpp/hash_combine.hpp b/src/utils/cpp/hash_combine.hpp index 6660815d..a09c9985 100644 --- a/src/utils/cpp/hash_combine.hpp +++ b/src/utils/cpp/hash_combine.hpp @@ -15,6 +15,8 @@ #ifndef INCLUDED_SRC_UTILS_CPP_HASH_COMBINE_HPP #define INCLUDED_SRC_UTILS_CPP_HASH_COMBINE_HPP +#include <cstddef> + #include "gsl/gsl" // Taken from Boost, as hash_combine did not yet make it to STL. diff --git a/src/utils/cpp/json.hpp b/src/utils/cpp/json.hpp index d83f30ed..c52b8bd2 100644 --- a/src/utils/cpp/json.hpp +++ b/src/utils/cpp/json.hpp @@ -16,6 +16,7 @@ #define INCLUDED_SRC_UTILS_CPP_JSON_HPP #include <algorithm> +#include <cstddef> #include <optional> #include <sstream> #include <string> diff --git a/src/utils/cpp/path_hash.hpp b/src/utils/cpp/path_hash.hpp index 0f3910f2..2f433c30 100644 --- a/src/utils/cpp/path_hash.hpp +++ b/src/utils/cpp/path_hash.hpp @@ -15,6 +15,7 @@ #ifndef INCLUDED_SRC_UTILS_CPP_PATH_HASH_HPP #define INCLUDED_SRC_UTILS_CPP_PATH_HASH_HPP +#include <cstddef> #include <filesystem> // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) |