1 // (C) Copyright David Abrahams 2002.
\r
2 // (C) Copyright Jeremy Siek 2002.
\r
3 // (C) Copyright Thomas Witt 2002.
\r
4 // Distributed under the Boost Software License, Version 1.0. (See
\r
5 // accompanying file LICENSE_1_0.txt or copy at
\r
6 // http://www.boost.org/LICENSE_1_0.txt)
\r
7 #ifndef BOOST_INTEROPERABLE_23022003THW_HPP
\r
8 # define BOOST_INTEROPERABLE_23022003THW_HPP
\r
10 # include <boost/mpl/bool.hpp>
\r
11 # include <boost/mpl/or.hpp>
\r
13 # include <boost/type_traits/is_convertible.hpp>
\r
15 # include <boost/iterator/detail/config_def.hpp> // must appear last
\r
21 // Meta function that determines whether two
\r
22 // iterator types are considered interoperable.
\r
24 // Two iterator types A,B are considered interoperable if either
\r
25 // A is convertible to B or vice versa.
\r
26 // This interoperability definition is in sync with the
\r
27 // standards requirements on constant/mutable container
\r
28 // iterators (23.1 [lib.container.requirements]).
\r
30 // For compilers that don't support is_convertible
\r
31 // is_interoperable gives false positives. See comments
\r
32 // on operator implementation for consequences.
\r
34 template <typename A, typename B>
\r
35 struct is_interoperable
\r
36 # ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
\r
40 is_convertible< A, B >
\r
41 , is_convertible< B, A > >
\r
46 } // namespace boost
\r
48 # include <boost/iterator/detail/config_undef.hpp>
\r
50 #endif // BOOST_INTEROPERABLE_23022003THW_HPP
\r