#ifndef BOOST_HASH2_DETAIL_HAS_TAG_INVOKE_HPP_INCLUDED #define BOOST_HASH2_DETAIL_HAS_TAG_INVOKE_HPP_INCLUDED // Copyright 2024 Peter Dimov. // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #include #include #include #include namespace boost { namespace hash2 { struct hash_append_tag; namespace detail { struct provider_archetype { template static void hash_append( Hash& h, Flavor const& f, T const& v ); template static void hash_append_range( Hash& h, Flavor const& f, It first, It last ); template static void hash_append_size( Hash& h, Flavor const& f, T const& v ); template static void hash_append_range_and_size( Hash& h, Flavor const& f, It first, It last ); template static void hash_append_unordered_range( Hash& h, Flavor const& f, It first, It last ); }; struct hash_archetype { using result_type = std::uint64_t; hash_archetype(); explicit hash_archetype( std::uint64_t ); hash_archetype( void const*, std::size_t ); void update( void const*, std::size_t ); result_type result(); }; struct flavor_archetype { using size_type = std::uint32_t; static constexpr auto byte_order = endian::native; }; template struct has_tag_invoke: std::false_type { }; template struct has_tag_invoke(), std::declval(), std::declval(), std::declval(), std::declval() ), void())>: std::true_type { }; } // namespace detail } // namespace hash2 } // namespace boost #endif // #ifndef BOOST_HASH2_DETAIL_HAS_TAG_INVOKE_HPP_INCLUDED