diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2025-05-02 07:42:02 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2025-05-02 07:42:02 +0200 |
commit | fc486627a4ecbae797fa6856d8a9204ea85f4db8 (patch) | |
tree | ff3dae4c0e5d980d8e2da4fc6256ae839269bbcd /libcutl/cutl/details/boost/iterator/interoperable.hpp | |
parent | 1c188393cd2e271ed2581471b601fb5960777fd8 (diff) | |
parent | ecba0bbd9947036dd82f16ab95252f8db445e149 (diff) |
Merge tag 'debian/4.0.0-10' into developdevelop
Bugfix release
Diffstat (limited to 'libcutl/cutl/details/boost/iterator/interoperable.hpp')
-rw-r--r-- | libcutl/cutl/details/boost/iterator/interoperable.hpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/libcutl/cutl/details/boost/iterator/interoperable.hpp b/libcutl/cutl/details/boost/iterator/interoperable.hpp new file mode 100644 index 0000000..1e76e21 --- /dev/null +++ b/libcutl/cutl/details/boost/iterator/interoperable.hpp @@ -0,0 +1,50 @@ +// (C) Copyright David Abrahams 2002. +// (C) Copyright Jeremy Siek 2002. +// (C) Copyright Thomas Witt 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// 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 + +# include <cutl/details/boost/mpl/bool.hpp> +# include <cutl/details/boost/mpl/or.hpp> + +# include <cutl/details/boost/type_traits/is_convertible.hpp> + +# include <cutl/details/boost/iterator/detail/config_def.hpp> // must appear last + +namespace cutl_details_boost +{ + + // + // 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 +# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY + : mpl::true_ +# else + : mpl::or_< + is_convertible< A, B > + , is_convertible< B, A > > +# endif + { + }; + +} // namespace cutl_details_boost + +# include <cutl/details/boost/iterator/detail/config_undef.hpp> + +#endif // BOOST_INTEROPERABLE_23022003THW_HPP |