| 1 | #ifndef BOOST_HASH_IS_TUPLE_LIKE_HPP_INCLUDED |
|---|---|
| 2 | #define BOOST_HASH_IS_TUPLE_LIKE_HPP_INCLUDED |
| 3 | |
| 4 | // Copyright 2017, 2022 Peter Dimov. |
| 5 | // Distributed under the Boost Software License, Version 1.0. |
| 6 | // https://www.boost.org/LICENSE_1_0.txt |
| 7 | |
| 8 | #include <boost/type_traits/integral_constant.hpp> |
| 9 | #include <boost/config.hpp> |
| 10 | #include <boost/config/workaround.hpp> |
| 11 | #include <utility> |
| 12 | |
| 13 | namespace boost |
| 14 | { |
| 15 | namespace hash_detail |
| 16 | { |
| 17 | |
| 18 | template<class T, class E = true_type> struct is_tuple_like_: false_type |
| 19 | { |
| 20 | }; |
| 21 | |
| 22 | #if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !BOOST_WORKAROUND(BOOST_MSVC, <= 1800) |
| 23 | |
| 24 | template<class T> struct is_tuple_like_<T, integral_constant<bool, std::tuple_size<T>::value == std::tuple_size<T>::value> >: true_type |
| 25 | { |
| 26 | }; |
| 27 | |
| 28 | #endif |
| 29 | |
| 30 | } // namespace hash_detail |
| 31 | |
| 32 | namespace container_hash |
| 33 | { |
| 34 | |
| 35 | template<class T> struct is_tuple_like: hash_detail::is_tuple_like_<T> |
| 36 | { |
| 37 | }; |
| 38 | |
| 39 | } // namespace container_hash |
| 40 | } // namespace boost |
| 41 | |
| 42 | #endif // #ifndef BOOST_HASH_IS_TUPLE_LIKE_HPP_INCLUDED |
| 43 |