]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/numeric/odeint/include/boost/numeric/odeint/util/detail/is_range.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / numeric / odeint / include / boost / numeric / odeint / util / detail / is_range.hpp
CommitLineData
7c673cae
FG
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 2011-2013 Karsten Ahnert
10 Copyright 2011-2013 Thorsten Ottosen
11
12
13
14 Distributed under the Boost Software License, Version 1.0.
15 (See accompanying file LICENSE_1_0.txt or
16 copy at http://www.boost.org/LICENSE_1_0.txt)
17 */
18
19
20#ifndef BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED
21#define BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED
22
23
24#if defined(_MSC_VER) && (_MSC_VER >= 1200)
25# pragma once
26#endif
27
28#include <cstddef>
29#include <boost/range/config.hpp>
30#include <boost/mpl/has_xxx.hpp>
31#include <boost/mpl/bool.hpp>
32#include <boost/mpl/and.hpp>
33
34namespace boost {
35namespace numeric {
36namespace odeint {
37
38
39
40namespace range_detail
41{
42BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator)
43 BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator)
44}
45
46namespace detail
47{
48
49template< typename Range >
50struct is_range : boost::mpl::and_<range_detail::has_iterator<Range>, range_detail::has_const_iterator<Range> >
51{
52};
53
54//////////////////////////////////////////////////////////////////////////
55// pair
56//////////////////////////////////////////////////////////////////////////
57
58template< typename iteratorT >
59struct is_range< std::pair<iteratorT,iteratorT> > : boost::mpl::true_
60{
61};
62
63template< typename iteratorT >
64struct is_range< const std::pair<iteratorT,iteratorT> > : boost::mpl::true_
65{
66};
67
68//////////////////////////////////////////////////////////////////////////
69// array
70//////////////////////////////////////////////////////////////////////////
71
72template< typename elementT, std::size_t sz >
73struct is_range< elementT[sz] > : boost::mpl::true_
74{
75};
76
77template< typename elementT, std::size_t sz >
78struct is_range< const elementT[sz] > : boost::mpl::true_
79{
80};
81
82//////////////////////////////////////////////////////////////////////////
83// string
84//////////////////////////////////////////////////////////////////////////
85
86template<>
87struct is_range< char* > : boost::mpl::true_
88{
89};
90
91template<>
92struct is_range< wchar_t* > : boost::mpl::true_
93{
94};
95
96template<>
97struct is_range< const char* > : boost::mpl::true_
98{
99};
100
101template<>
102struct is_range< const wchar_t* > : boost::mpl::true_
103{
104};
105
106template<>
107struct is_range< char* const > : boost::mpl::true_
108{
109};
110
111template<>
112struct is_range< wchar_t* const > : boost::mpl::true_
113{
114};
115
116template<>
117struct is_range< const char* const > : boost::mpl::true_
118{
119};
120
121template<>
122struct is_range< const wchar_t* const > : boost::mpl::true_
123{
124};
125
126} // namespace detail
127
128} // namespace odeint
129} // namespace numeric
130} // namespace boost
131
132
133
134#endif // BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED