Added a missing include in interoperable.hpp.

This commit is contained in:
Andrey Semashev 2025-02-04 00:26:15 +03:00
parent 0c2eda4bb8
commit b6a41e325c

View File

@ -5,32 +5,33 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_INTEROPERABLE_23022003THW_HPP
# define BOOST_INTEROPERABLE_23022003THW_HPP
#define BOOST_INTEROPERABLE_23022003THW_HPP
# include <boost/iterator/detail/type_traits/disjunction.hpp>
#include <type_traits>
#include <boost/iterator/detail/type_traits/disjunction.hpp>
namespace boost {
namespace iterators {
//
// Meta function that determines whether two
// iterator types are considered interoperable.
//
// Two iterator types A,B are considered interoperable if either
// A is convertible to B or vice versa.
// This interoperability definition is in sync with the
// standards requirements on constant/mutable container
// iterators (23.1 [lib.container.requirements]).
//
// For compilers that don't support is_convertible
// is_interoperable gives false positives. See comments
// on operator implementation for consequences.
//
template <typename A, typename B>
struct is_interoperable
: detail::disjunction<std::is_convertible<A, B>, std::is_convertible<B, A>>
{
};
//
// Meta function that determines whether two
// iterator types are considered interoperable.
//
// Two iterator types A,B are considered interoperable if either
// A is convertible to B or vice versa.
// This interoperability definition is in sync with the
// standards requirements on constant/mutable container
// iterators (23.1 [lib.container.requirements]).
//
// For compilers that don't support is_convertible
// is_interoperable gives false positives. See comments
// on operator implementation for consequences.
//
template< typename A, typename B >
struct is_interoperable :
public detail::disjunction< std::is_convertible< A, B >, std::is_convertible< B, A > >
{
};
} // namespace iterators