Skip to content

Commit

Permalink
Merge pull request #138 from gvansickle/bugfix/137-fix-stdis_literal_…
Browse files Browse the repository at this point in the history
…type-warning

Removed unnecessary static checks of dev_ino_pair properties.  Removed…
  • Loading branch information
gvansickle authored May 27, 2023
2 parents cbb185e + 6f0b07e commit f98b29c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/libext/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ inline std::ostream& operator<<(std::ostream &out, const FileException &fe) noex
struct dev_ino_pair
{
dev_ino_pair() = default;
constexpr dev_ino_pair(dev_t d, ino_t i) noexcept : m_dev(d), m_ino(i) { };
dev_ino_pair(dev_t d, ino_t i) noexcept : m_dev(d), m_ino(i) { };
~dev_ino_pair() = default;

inline bool operator<(const dev_ino_pair& other) const noexcept { return m_dev < other.m_dev || m_ino < other.m_ino; };
Expand All @@ -163,7 +163,10 @@ struct dev_ino_pair

namespace std
{
// Inject a specialization of std::hash<> into std:: for dev_ino_pair.
/**
* Inject a specialization of std::hash<> into std:: for dev_ino_pair
* so it can be used in unordered containers.
*/
template <>
struct hash<dev_ino_pair>
{
Expand All @@ -176,10 +179,6 @@ namespace std
};
}

// Check that dev_ino_pair meets the LiteralType concept.
static_assert(std::is_trivially_destructible<dev_ino_pair>::value, "no trivial destructor.");
static_assert(std::is_class<dev_ino_pair>::value, "not an aggregate type");
static_assert(std::is_literal_type<dev_ino_pair>::value, "dev_ino_pair isn't trivial");

/**
* Get the d_name field out of the passed dirent struct #de and into a std::string, in as efficient manner as possible.
Expand Down

0 comments on commit f98b29c

Please sign in to comment.