Files
externals/linux/include/ActivBoost/container_hash/is_unordered_range.hpp
T
2023-12-15 13:15:08 -05:00

40 lines
986 B
C++

// Copyright 2017 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#ifndef ACTIV_BOOST_HASH_IS_UNORDERED_RANGE_HPP_INCLUDED
#define ACTIV_BOOST_HASH_IS_UNORDERED_RANGE_HPP_INCLUDED
#include <ActivBoost/container_hash/is_range.hpp>
#include <ActivBoost/type_traits/integral_constant.hpp>
#include <ActivBoost/type_traits/is_same.hpp>
namespace Boost
{
namespace hash_detail
{
template<class T, class E = true_type> struct has_hasher_: false_type
{
};
template<class T> struct has_hasher_< T, integral_constant< bool,
is_same<typename T::hasher, typename T::hasher>::value
> >: true_type
{
};
} // namespace hash_detail
namespace container_hash
{
template<class T> struct is_unordered_range: integral_constant< bool, is_range<T>::value && hash_detail::has_hasher_<T>::value >
{
};
} // namespace container_hash
} // namespace Boost
#endif // #ifndef ACTIV_BOOST_HASH_IS_UNORDERED_RANGE_HPP_INCLUDED