is_trivially_equality_comparable.hpp 757 B

1234567891011121314151617181920212223242526272829
  1. #ifndef BOOST_HASH2_IS_TRIVIALLY_EQUALITY_COMPARABLE_HPP_INCLUDED
  2. #define BOOST_HASH2_IS_TRIVIALLY_EQUALITY_COMPARABLE_HPP_INCLUDED
  3. // Copyright 2017, 2023, 2024 Peter Dimov.
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // https://www.boost.org/LICENSE_1_0.txt
  6. #include <type_traits>
  7. namespace boost
  8. {
  9. namespace hash2
  10. {
  11. template<class T> struct is_trivially_equality_comparable:
  12. std::integral_constant< bool, std::is_integral<T>::value || std::is_enum<T>::value || std::is_pointer<T>::value >
  13. {
  14. };
  15. template<class T> struct is_trivially_equality_comparable<T const>:
  16. is_trivially_equality_comparable<T>
  17. {
  18. };
  19. } // namespace hash2
  20. } // namespace boost
  21. #endif // #ifndef BOOST_HASH2_IS_TRIVIALLY_EQUALITY_COMPARABLE_HPP_INCLUDED