[857] | 1 | // (C) Copyright Jonathan Turkanis 2003.
|
---|
| 2 | // Distributed under the Boost Software License, Version 1.0. (See accompanying
|
---|
| 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
|
---|
| 4 |
|
---|
| 5 | // See http://www.boost.org/libs/iostreams for documentation.
|
---|
| 6 |
|
---|
| 7 | #ifndef BOOST_IOSTREAMS_DETAIL_DISPATCH_HPP_INCLUDED
|
---|
| 8 | #define BOOST_IOSTREAMS_DETAIL_DISPATCH_HPP_INCLUDED
|
---|
| 9 |
|
---|
| 10 | #if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
---|
| 11 | # pragma once
|
---|
| 12 | #endif
|
---|
| 13 |
|
---|
| 14 | #include <boost/config.hpp> // BOOST_DEDUCED_TYPENAME.
|
---|
| 15 | #include <boost/iostreams/detail/select.hpp>
|
---|
| 16 | #include <boost/iostreams/traits.hpp> // category_of.
|
---|
| 17 | #include <boost/mpl/void.hpp>
|
---|
| 18 | #include <boost/type_traits/is_convertible.hpp>
|
---|
| 19 |
|
---|
| 20 | namespace boost { namespace iostreams {namespace detail {
|
---|
| 21 |
|
---|
| 22 | template< typename T, typename Tag1, typename Tag2,
|
---|
| 23 | typename Tag3 = mpl::void_, typename Tag4 = mpl::void_,
|
---|
| 24 | typename Tag5 = mpl::void_, typename Tag6 = mpl::void_,
|
---|
| 25 | typename Category =
|
---|
| 26 | BOOST_DEDUCED_TYPENAME category_of<T>::type >
|
---|
| 27 | struct dispatch
|
---|
| 28 | : iostreams::select< // Disambiguation for Tru64.
|
---|
| 29 | is_convertible<Category, Tag1>, Tag1,
|
---|
| 30 | is_convertible<Category, Tag2>, Tag2,
|
---|
| 31 | is_convertible<Category, Tag3>, Tag3,
|
---|
| 32 | is_convertible<Category, Tag4>, Tag4,
|
---|
| 33 | is_convertible<Category, Tag5>, Tag5,
|
---|
| 34 | is_convertible<Category, Tag6>, Tag6
|
---|
| 35 | >
|
---|
| 36 | { };
|
---|
| 37 |
|
---|
| 38 | } } } // End namespaces detail, iostreams, boost.
|
---|
| 39 |
|
---|
| 40 | #endif // #ifndef BOOST_IOSTREAMS_DETAIL_DISPATCH_HPP_INCLUDED
|
---|