comparison DEPENDENCIES/generic/include/boost/numeric/odeint/util/detail/is_range.hpp @ 16:2665513ce2d3

Add boost headers
author Chris Cannam
date Tue, 05 Aug 2014 11:11:38 +0100
parents
children c530137014c0
comparison
equal deleted inserted replaced
15:663ca0da4350 16:2665513ce2d3
1 /*
2 [auto_generated]
3 boost/numeric/odeint/util/detail/is_range.hpp
4
5 [begin_description]
6 is_range implementation. Taken from the boost::range library.
7 [end_description]
8
9 Copyright Thorsten Ottosen 2003-2004
10
11
12
13 Distributed under the Boost Software License, Version 1.0.
14 (See accompanying file LICENSE_1_0.txt or
15 copy at http://www.boost.org/LICENSE_1_0.txt)
16 */
17
18
19 #ifndef BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED
20 #define BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED
21
22
23 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
24 # pragma once
25 #endif
26
27 #include <cstddef>
28 #include <boost/range/config.hpp>
29 #include <boost/mpl/has_xxx.hpp>
30 #include <boost/mpl/bool.hpp>
31 #include <boost/mpl/and.hpp>
32
33 namespace boost {
34 namespace numeric {
35 namespace odeint {
36
37
38
39 namespace range_detail
40 {
41 BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator)
42 BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator)
43 }
44
45 namespace detail
46 {
47
48 template< typename Range >
49 struct is_range : boost::mpl::and_<range_detail::has_iterator<Range>, range_detail::has_const_iterator<Range> >
50 {
51 };
52
53 //////////////////////////////////////////////////////////////////////////
54 // pair
55 //////////////////////////////////////////////////////////////////////////
56
57 template< typename iteratorT >
58 struct is_range< std::pair<iteratorT,iteratorT> > : boost::mpl::true_
59 {
60 };
61
62 template< typename iteratorT >
63 struct is_range< const std::pair<iteratorT,iteratorT> > : boost::mpl::true_
64 {
65 };
66
67 //////////////////////////////////////////////////////////////////////////
68 // array
69 //////////////////////////////////////////////////////////////////////////
70
71 template< typename elementT, std::size_t sz >
72 struct is_range< elementT[sz] > : boost::mpl::true_
73 {
74 };
75
76 template< typename elementT, std::size_t sz >
77 struct is_range< const elementT[sz] > : boost::mpl::true_
78 {
79 };
80
81 //////////////////////////////////////////////////////////////////////////
82 // string
83 //////////////////////////////////////////////////////////////////////////
84
85 template<>
86 struct is_range< char* > : boost::mpl::true_
87 {
88 };
89
90 template<>
91 struct is_range< wchar_t* > : boost::mpl::true_
92 {
93 };
94
95 template<>
96 struct is_range< const char* > : boost::mpl::true_
97 {
98 };
99
100 template<>
101 struct is_range< const wchar_t* > : boost::mpl::true_
102 {
103 };
104
105 template<>
106 struct is_range< char* const > : boost::mpl::true_
107 {
108 };
109
110 template<>
111 struct is_range< wchar_t* const > : boost::mpl::true_
112 {
113 };
114
115 template<>
116 struct is_range< const char* const > : boost::mpl::true_
117 {
118 };
119
120 template<>
121 struct is_range< const wchar_t* const > : boost::mpl::true_
122 {
123 };
124
125 } // namespace detail
126
127 } // namespace odeint
128 } // namespace numeric
129 } // namespace boost
130
131
132
133 #endif // BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED