flavor.hpp 766 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef BOOST_HASH2_FLAVOR_HPP_INCLUDED
  2. #define BOOST_HASH2_FLAVOR_HPP_INCLUDED
  3. // Copyright 2024 Peter Dimov.
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // https://www.boost.org/LICENSE_1_0.txt
  6. #include <boost/hash2/endian.hpp>
  7. #include <cstdint>
  8. namespace boost
  9. {
  10. namespace hash2
  11. {
  12. struct default_flavor
  13. {
  14. using size_type = std::uint32_t;
  15. static constexpr auto byte_order = endian::native;
  16. };
  17. struct little_endian_flavor
  18. {
  19. using size_type = std::uint32_t;
  20. static constexpr auto byte_order = endian::little;
  21. };
  22. struct big_endian_flavor
  23. {
  24. using size_type = std::uint32_t;
  25. static constexpr auto byte_order = endian::big;
  26. };
  27. } // namespace hash2
  28. } // namespace boost
  29. #endif // #ifndef BOOST_HASH2_FLAVOR_HPP_INCLUDED