diff --git a/src/libext/filesystem.hpp b/src/libext/filesystem.hpp index 03db7f4..ab7e626 100644 --- a/src/libext/filesystem.hpp +++ b/src/libext/filesystem.hpp @@ -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; }; @@ -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 { @@ -176,10 +179,6 @@ namespace std }; } -// Check that dev_ino_pair meets the LiteralType concept. -static_assert(std::is_trivially_destructible::value, "no trivial destructor."); -static_assert(std::is_class::value, "not an aggregate type"); -static_assert(std::is_literal_type::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.