Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-06-30 08:21:47

0001 /*
0002  [auto_generated]
0003  boost/numeric/odeint/util/detail/is_range.hpp
0004 
0005  [begin_description]
0006  is_range implementation. Taken from the boost::range library.
0007  [end_description]
0008 
0009  Copyright 2011-2013 Karsten Ahnert
0010  Copyright 2011-2013 Thorsten Ottosen
0011 
0012 
0013 
0014  Distributed under the Boost Software License, Version 1.0.
0015  (See accompanying file LICENSE_1_0.txt or
0016  copy at http://www.boost.org/LICENSE_1_0.txt)
0017  */
0018 
0019 
0020 #ifndef BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED
0021 #define BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED
0022 
0023 
0024 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0025 # pragma once
0026 #endif
0027 
0028 #include <cstddef>
0029 #include <type_traits>
0030 #include <boost/range/config.hpp>
0031 #include <boost/numeric/odeint/tools/traits.hpp>
0032 
0033 namespace boost {
0034 namespace numeric {
0035 namespace odeint {
0036 
0037 namespace detail {
0038 
0039 BOOST_NUMERIC_ODEINT_HAS_NAMED_TRAIT(has_iterator, iterator);
0040 BOOST_NUMERIC_ODEINT_HAS_NAMED_TRAIT(has_const_iterator, const_iterator);
0041 
0042 template< typename Range >
0043 struct is_range : std::integral_constant<bool, (has_iterator<Range>::value && has_const_iterator<Range>::value)>
0044 {
0045 };
0046 
0047 //////////////////////////////////////////////////////////////////////////
0048 // pair
0049 //////////////////////////////////////////////////////////////////////////
0050 
0051 template< typename iteratorT >
0052 struct is_range< std::pair<iteratorT,iteratorT> > : std::integral_constant<bool, true>
0053 {
0054 };
0055 
0056 template< typename iteratorT >
0057 struct is_range< const std::pair<iteratorT,iteratorT> > : std::integral_constant<bool, true>
0058 {
0059 };
0060 
0061 //////////////////////////////////////////////////////////////////////////
0062 // array
0063 //////////////////////////////////////////////////////////////////////////
0064 
0065 template< typename elementT, std::size_t sz >
0066 struct is_range< elementT[sz] > : std::integral_constant<bool, true>
0067 {
0068 };
0069 
0070 template< typename elementT, std::size_t sz >
0071 struct is_range< const elementT[sz] > : std::integral_constant<bool, true>
0072 {
0073 };
0074 
0075 //////////////////////////////////////////////////////////////////////////
0076 // string
0077 //////////////////////////////////////////////////////////////////////////
0078 
0079 template<>
0080 struct is_range< char* > : std::integral_constant<bool, true>
0081 {
0082 };
0083 
0084 template<>
0085 struct is_range< wchar_t* > : std::integral_constant<bool, true>
0086 {
0087 };
0088 
0089 template<>
0090 struct is_range< const char* > : std::integral_constant<bool, true>
0091 {
0092 };
0093 
0094 template<>
0095 struct is_range< const wchar_t* > : std::integral_constant<bool, true>
0096 {
0097 };
0098 
0099 template<>
0100 struct is_range< char* const > : std::integral_constant<bool, true>
0101 {
0102 };
0103 
0104 template<>
0105 struct is_range< wchar_t* const > : std::integral_constant<bool, true>
0106 {
0107 };
0108 
0109 template<>
0110 struct is_range< const char* const > : std::integral_constant<bool, true>
0111 {
0112 };
0113 
0114 template<>
0115 struct is_range< const wchar_t* const > : std::integral_constant<bool, true>
0116 {
0117 };
0118 
0119 } // namespace detail
0120 
0121 } // namespace odeint
0122 } // namespace numeric
0123 } // namespace boost
0124 
0125 
0126 
0127 #endif // BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED