Skip to content

Commit

Permalink
Move do_hash_append to namespace detail
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Nov 19, 2024
1 parent 301a5b1 commit 38a5a57
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions include/boost/hash2/hash_append.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ template<class Hash, class Flavor = default_flavor, class It> BOOST_CXX14_CONSTE

// do_hash_append

struct hash_append_tag
{
};

namespace detail
{

// integral types

template<class Hash, class Flavor, class T>
Expand Down Expand Up @@ -313,18 +320,13 @@ template<class Hash, class Flavor, class T>

// tuple-likes

namespace detail
{

template<class Hash, class Flavor, class T, std::size_t... J> BOOST_CXX14_CONSTEXPR void hash_append_tuple( Hash& h, Flavor const& f, T const& v, boost::mp11::integer_sequence<std::size_t, J...> )
{
using std::get;
int a[] = { 0, ((void)hash2::hash_append( h, f, get<J>(v) ), 0)... };
(void)a;
}

} // namespace detail

template<class Hash, class Flavor, class T>
BOOST_CXX14_CONSTEXPR
typename std::enable_if< !container_hash::is_range<T>::value && container_hash::is_tuple_like<T>::value, void >::type
Expand Down Expand Up @@ -387,10 +389,6 @@ template<class Hash, class Flavor, class T>

// classes with tag_invoke

struct hash_append_tag
{
};

template<class Hash, class Flavor, class T>
BOOST_CXX14_CONSTEXPR
typename std::enable_if< detail::has_tag_invoke<T>::value, void >::type
Expand All @@ -399,6 +397,8 @@ template<class Hash, class Flavor, class T>
tag_invoke( hash_append_tag(), h, f, v );
}

} // namespace detail

// hash_append

template<class Hash, class Flavor = default_flavor, class T>
Expand All @@ -410,7 +410,7 @@ BOOST_CXX14_CONSTEXPR void hash_append( Hash& h, Flavor const& f, T const& v )
}
else
{
do_hash_append( h, f, v );
detail::do_hash_append( h, f, v );
}
}

Expand Down

0 comments on commit 38a5a57

Please sign in to comment.