hash_append_fwd.hpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef BOOST_HASH2_HASH_APPEND_FWD_HPP_INCLUDED
  2. #define BOOST_HASH2_HASH_APPEND_FWD_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/config.hpp>
  7. namespace boost
  8. {
  9. namespace hash2
  10. {
  11. #if defined(BOOST_GCC) && BOOST_GCC < 120000
  12. // Due to a bug in GCC 11 and earlier, the default argument
  13. // for Flavor needs to be present on the first declaration
  14. struct default_flavor;
  15. template<class Hash, class Flavor = default_flavor, class T> BOOST_CXX14_CONSTEXPR void hash_append( Hash& h, Flavor const& f, T const& v );
  16. template<class Hash, class Flavor = default_flavor, class It> BOOST_CXX14_CONSTEXPR void hash_append_range( Hash& h, Flavor const& f, It first, It last );
  17. template<class Hash, class Flavor = default_flavor, class T> BOOST_CXX14_CONSTEXPR void hash_append_size( Hash& h, Flavor const& f, T const& v );
  18. template<class Hash, class Flavor = default_flavor, class It> BOOST_CXX14_CONSTEXPR void hash_append_range_and_size( Hash& h, Flavor const& f, It first, It last );
  19. template<class Hash, class Flavor = default_flavor, class It> BOOST_CXX14_CONSTEXPR void hash_append_unordered_range( Hash& h, Flavor const& f, It first, It last );
  20. #else
  21. template<class Hash, class Flavor, class T> BOOST_CXX14_CONSTEXPR void hash_append( Hash& h, Flavor const& f, T const& v );
  22. template<class Hash, class Flavor, class It> BOOST_CXX14_CONSTEXPR void hash_append_range( Hash& h, Flavor const& f, It first, It last );
  23. template<class Hash, class Flavor, class T> BOOST_CXX14_CONSTEXPR void hash_append_size( Hash& h, Flavor const& f, T const& v );
  24. template<class Hash, class Flavor, class It> BOOST_CXX14_CONSTEXPR void hash_append_range_and_size( Hash& h, Flavor const& f, It first, It last );
  25. template<class Hash, class Flavor, class It> BOOST_CXX14_CONSTEXPR void hash_append_unordered_range( Hash& h, Flavor const& f, It first, It last );
  26. #endif
  27. struct hash_append_tag;
  28. } // namespace hash2
  29. } // namespace boost
  30. #endif // #ifndef BOOST_HASH2_HASH_APPEND_FWD_HPP_INCLUDED