123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- #ifndef IS_READABLE_ITERATOR_DWA2003112_HPP
- # define IS_READABLE_ITERATOR_DWA2003112_HPP
- #include <boost/mpl/bool.hpp>
- #include <boost/detail/iterator.hpp>
- #include <boost/type_traits/detail/bool_trait_def.hpp>
- #include <boost/iterator/detail/any_conversion_eater.hpp>
- #include <boost/iterator/detail/config_def.hpp>
- #ifndef BOOST_NO_IS_CONVERTIBLE
- namespace boost {
-
- namespace detail
- {
-
-
- template <class Value>
- struct is_readable_iterator_impl
- {
- static char tester(Value&, int);
- static char (& tester(any_conversion_eater, ...) )[2];
-
- template <class It>
- struct rebind
- {
- static It& x;
-
- BOOST_STATIC_CONSTANT(
- bool
- , value = (
- sizeof(
- is_readable_iterator_impl<Value>::tester(*x, 1)
- ) == 1
- )
- );
- };
- };
- #undef BOOST_READABLE_PRESERVER
-
-
-
-
- template <>
- struct is_readable_iterator_impl<void>
- {
- template <class It>
- struct rebind : boost::mpl::false_
- {};
- };
- #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
- template <>
- struct is_readable_iterator_impl<const void>
- {
- template <class It>
- struct rebind : boost::mpl::false_
- {};
- };
- template <>
- struct is_readable_iterator_impl<volatile void>
- {
- template <class It>
- struct rebind : boost::mpl::false_
- {};
- };
- template <>
- struct is_readable_iterator_impl<const volatile void>
- {
- template <class It>
- struct rebind : boost::mpl::false_
- {};
- };
- #endif
-
-
-
-
- template <class It>
- struct is_readable_iterator_impl2
- : is_readable_iterator_impl<
- BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<It>::value_type const
- >::template rebind<It>
- {};
- }
- BOOST_TT_AUX_BOOL_TRAIT_DEF1(
- is_readable_iterator,T,::boost::detail::is_readable_iterator_impl2<T>::value)
-
- }
- #endif
- #include <boost/iterator/detail/config_undef.hpp>
- #endif
|