File indexing completed on 2025-01-18 09:38:54
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_IOSTREAMS_INPUT_SEQUENCE_HPP_INCLUDED
0009 #define BOOST_IOSTREAMS_INPUT_SEQUENCE_HPP_INCLUDED
0010
0011 #if defined(_MSC_VER)
0012 # pragma once
0013 #endif
0014
0015 #include <utility> // pair.
0016 #include <boost/config.hpp> // DEDUCED_TYPENAME, MSVC.
0017 #include <boost/detail/workaround.hpp>
0018 #include <boost/iostreams/detail/wrap_unwrap.hpp>
0019 #include <boost/iostreams/operations_fwd.hpp> // is_custom
0020 #include <boost/iostreams/traits.hpp>
0021 #include <boost/mpl/if.hpp>
0022
0023
0024 #include <boost/iostreams/detail/config/disable_warnings.hpp>
0025
0026 namespace boost { namespace iostreams {
0027
0028 namespace detail {
0029
0030 template<typename T>
0031 struct input_sequence_impl;
0032
0033 }
0034
0035 template<typename T>
0036 inline std::pair<
0037 BOOST_DEDUCED_TYPENAME char_type_of<T>::type*,
0038 BOOST_DEDUCED_TYPENAME char_type_of<T>::type*
0039 >
0040 input_sequence(T& t)
0041 { return detail::input_sequence_impl<T>::input_sequence(t); }
0042
0043 namespace detail {
0044
0045
0046
0047 template<typename T>
0048 struct input_sequence_impl
0049 : mpl::if_<
0050 detail::is_custom<T>,
0051 operations<T>,
0052 input_sequence_impl<direct_tag>
0053 >::type
0054 { };
0055
0056 template<>
0057 struct input_sequence_impl<direct_tag> {
0058 template<typename U>
0059 static std::pair<
0060 BOOST_DEDUCED_TYPENAME char_type_of<U>::type*,
0061 BOOST_DEDUCED_TYPENAME char_type_of<U>::type*
0062 >
0063 input_sequence(U& u) { return u.input_sequence(); }
0064 };
0065
0066 }
0067
0068 } }
0069
0070 #include <boost/iostreams/detail/config/enable_warnings.hpp>
0071
0072 #endif