epoc32/include/stdapis/boost/iterator/interoperable.hpp
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/iterator/interoperable.hpp	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,50 @@
     1.4 +// (C) Copyright David Abrahams 2002.
     1.5 +// (C) Copyright Jeremy Siek    2002.
     1.6 +// (C) Copyright Thomas Witt    2002.
     1.7 +// Distributed under the Boost Software License, Version 1.0. (See
     1.8 +// accompanying file LICENSE_1_0.txt or copy at
     1.9 +// http://www.boost.org/LICENSE_1_0.txt)
    1.10 +#ifndef BOOST_INTEROPERABLE_23022003THW_HPP
    1.11 +# define BOOST_INTEROPERABLE_23022003THW_HPP
    1.12 +
    1.13 +# include <boost/mpl/bool.hpp>
    1.14 +# include <boost/mpl/or.hpp>
    1.15 +
    1.16 +# include <boost/type_traits/is_convertible.hpp>
    1.17 +
    1.18 +# include <boost/iterator/detail/config_def.hpp> // must appear last
    1.19 +
    1.20 +namespace boost
    1.21 +{
    1.22 +
    1.23 +  //
    1.24 +  // Meta function that determines whether two
    1.25 +  // iterator types are considered interoperable.
    1.26 +  //
    1.27 +  // Two iterator types A,B are considered interoperable if either
    1.28 +  // A is convertible to B or vice versa.
    1.29 +  // This interoperability definition is in sync with the
    1.30 +  // standards requirements on constant/mutable container
    1.31 +  // iterators (23.1 [lib.container.requirements]).
    1.32 +  //
    1.33 +  // For compilers that don't support is_convertible 
    1.34 +  // is_interoperable gives false positives. See comments
    1.35 +  // on operator implementation for consequences.
    1.36 +  //
    1.37 +  template <typename A, typename B>
    1.38 +  struct is_interoperable
    1.39 +# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
    1.40 +    : mpl::true_
    1.41 +# else
    1.42 +    : mpl::or_<
    1.43 +          is_convertible< A, B >
    1.44 +        , is_convertible< B, A > >
    1.45 +# endif
    1.46 +  { 
    1.47 +  };
    1.48 +
    1.49 +} // namespace boost
    1.50 +
    1.51 +# include <boost/iterator/detail/config_undef.hpp>
    1.52 +
    1.53 +#endif // BOOST_INTEROPERABLE_23022003THW_HPP