Skip to content

Commit

Permalink
Replace deprecated std::is_pod
Browse files Browse the repository at this point in the history
  • Loading branch information
nyllet committed Oct 15, 2023
1 parent 31e31a6 commit 40991ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions include/util/coordinate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ using FloatLongitude = Alias<double, tag::longitude>;
// range checks on these (toFixed/toFloat, etc)
using UnsafeFloatLatitude = Alias<double, tag::unsafelatitude>;
using UnsafeFloatLongitude = Alias<double, tag::unsafelongitude>;
static_assert(std::is_pod<FixedLatitude>(), "FixedLatitude is not a valid alias");
static_assert(std::is_pod<FixedLongitude>(), "FixedLongitude is not a valid alias");
static_assert(std::is_pod<FloatLatitude>(), "FloatLatitude is not a valid alias");
static_assert(std::is_pod<FloatLongitude>(), "FloatLongitude is not a valid alias");
static_assert(std::is_pod<UnsafeFloatLatitude>(), "UnsafeFloatLatitude is not a valid alias");
static_assert(std::is_pod<UnsafeFloatLongitude>(), "UnsafeFloatLongitude is not a valid alias");
static_assert(std::is_standard_layout<FixedLatitude>() && std::is_trivial<FixedLatitude>(), "FixedLatitude is not a valid alias");
static_assert(std::is_standard_layout<FixedLongitude>() && std::is_trivial<FixedLongitude>(), "FixedLongitude is not a valid alias");
static_assert(std::is_standard_layout<FloatLatitude>() && std::is_trivial<FloatLatitude>(), "FloatLatitude is not a valid alias");
static_assert(std::is_standard_layout<FloatLongitude>() && std::is_trivial<FloatLongitude>(), "FloatLongitude is not a valid alias");
static_assert(std::is_standard_layout<UnsafeFloatLatitude>() && std::is_trivial<UnsafeFloatLatitude>(), "UnsafeFloatLatitude is not a valid alias");
static_assert(std::is_standard_layout<UnsafeFloatLongitude>() && std::is_trivial<UnsafeFloatLongitude>(), "UnsafeFloatLongitude is not a valid alias");

/**
* Converts a typed latitude from floating to fixed representation.
Expand Down
2 changes: 1 addition & 1 deletion include/util/fingerprint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct FingerPrint

static_assert(sizeof(FingerPrint) == 8, "FingerPrint has unexpected size");
static_assert(std::is_trivial<FingerPrint>::value, "FingerPrint needs to be trivial.");
static_assert(std::is_pod<FingerPrint>::value, "FingerPrint needs to be a POD.");
static_assert(std::is_standard_layout<FingerPrint>::value, "FingerPrint needs have a standard layout.");
} // namespace osrm::util

#endif /* FingerPrint_H */
4 changes: 2 additions & 2 deletions include/util/typedefs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ struct turn_penalty
using OSMNodeID = osrm::Alias<std::uint64_t, tag::osm_node_id>;
// clang-tidy fires `bugprone-throw-keyword-missing` here for unknown reason
// NOLINTNEXTLINE(bugprone-throw-keyword-missing)
static_assert(std::is_pod<OSMNodeID>(), "OSMNodeID is not a valid alias");
static_assert(std::is_standard_layout<OSMNodeID>() && std::is_trivial<OSMNodeID>(), "OSMNodeID is not a valid alias");
using OSMWayID = osrm::Alias<std::uint64_t, tag::osm_way_id>;
// NOLINTNEXTLINE(bugprone-throw-keyword-missing)
static_assert(std::is_pod<OSMWayID>(), "OSMWayID is not a valid alias");
static_assert(std::is_standard_layout<OSMWayID>() && std::is_trivial<OSMWayID>(), "OSMWayID is not a valid alias");

using DuplicatedNodeID = std::uint64_t;
using RestrictionID = std::uint64_t;
Expand Down

0 comments on commit 40991ce

Please sign in to comment.