diff --git a/include/nlohmann/detail/hash.hpp b/include/nlohmann/detail/hash.hpp index d3313e968..4094cc94f 100644 --- a/include/nlohmann/detail/hash.hpp +++ b/include/nlohmann/detail/hash.hpp @@ -9,7 +9,7 @@ namespace detail { // boost::hash_combine -std::size_t combine(std::size_t seed, std::size_t h) noexcept +inline std::size_t combine(std::size_t seed, std::size_t h) noexcept { seed ^= h + 0x9e3779b9 + (seed << 6U) + (seed >> 2U); return seed; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 1d8b5fb61..8c604c528 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -4454,7 +4454,7 @@ namespace detail { // boost::hash_combine -std::size_t combine(std::size_t seed, std::size_t h) noexcept +inline std::size_t combine(std::size_t seed, std::size_t h) noexcept { seed ^= h + 0x9e3779b9 + (seed << 6U) + (seed >> 2U); return seed;