Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:38:54

0001 // (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
0002 // (C) Copyright 2003-2007 Jonathan Turkanis
0003 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0004 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
0005 
0006 // See http://www.boost.org/libs/iostreams for documentation.
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 // Must come last.
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 } // End namespace detail.
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 //------------------Definition of direct_impl-------------------------------//
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 } // End namespace detail.
0067 
0068 } } // End namespaces iostreams, boost.
0069 
0070 #include <boost/iostreams/detail/config/enable_warnings.hpp>
0071 
0072 #endif // #ifndef BOOST_IOSTREAMS_INPUT_SEQUENCE_HPP_INCLUDED