diff --git a/include/util/coordinate.hpp b/include/util/coordinate.hpp index 578b43ff21c..e19a1bc5ec5 100644 --- a/include/util/coordinate.hpp +++ b/include/util/coordinate.hpp @@ -72,12 +72,20 @@ using FloatLongitude = Alias; // range checks on these (toFixed/toFloat, etc) using UnsafeFloatLatitude = Alias; using UnsafeFloatLongitude = Alias; -static_assert(std::is_pod(), "FixedLatitude is not a valid alias"); -static_assert(std::is_pod(), "FixedLongitude is not a valid alias"); -static_assert(std::is_pod(), "FloatLatitude is not a valid alias"); -static_assert(std::is_pod(), "FloatLongitude is not a valid alias"); -static_assert(std::is_pod(), "UnsafeFloatLatitude is not a valid alias"); -static_assert(std::is_pod(), "UnsafeFloatLongitude is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "FixedLatitude is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "FixedLongitude is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "FloatLatitude is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "FloatLongitude is not a valid alias"); +static_assert(std::is_standard_layout() && + std::is_trivial(), + "UnsafeFloatLatitude is not a valid alias"); +static_assert(std::is_standard_layout() && + std::is_trivial(), + "UnsafeFloatLongitude is not a valid alias"); /** * Converts a typed latitude from floating to fixed representation. diff --git a/include/util/fingerprint.hpp b/include/util/fingerprint.hpp index 7e9d0c82589..d28264a53a5 100644 --- a/include/util/fingerprint.hpp +++ b/include/util/fingerprint.hpp @@ -33,7 +33,8 @@ struct FingerPrint static_assert(sizeof(FingerPrint) == 8, "FingerPrint has unexpected size"); static_assert(std::is_trivial::value, "FingerPrint needs to be trivial."); -static_assert(std::is_pod::value, "FingerPrint needs to be a POD."); +static_assert(std::is_standard_layout::value, + "FingerPrint needs have a standard layout."); } // namespace osrm::util #endif /* FingerPrint_H */ diff --git a/include/util/typedefs.hpp b/include/util/typedefs.hpp index 46b2807f3de..a5c4af2d335 100644 --- a/include/util/typedefs.hpp +++ b/include/util/typedefs.hpp @@ -71,10 +71,12 @@ struct turn_penalty using OSMNodeID = osrm::Alias; // clang-tidy fires `bugprone-throw-keyword-missing` here for unknown reason // NOLINTNEXTLINE(bugprone-throw-keyword-missing) -static_assert(std::is_pod(), "OSMNodeID is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "OSMNodeID is not a valid alias"); using OSMWayID = osrm::Alias; // NOLINTNEXTLINE(bugprone-throw-keyword-missing) -static_assert(std::is_pod(), "OSMWayID is not a valid alias"); +static_assert(std::is_standard_layout() && std::is_trivial(), + "OSMWayID is not a valid alias"); using DuplicatedNodeID = std::uint64_t; using RestrictionID = std::uint64_t;