123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #ifndef BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED
- #define BOOST_NUMERIC_ODEINT_UTIL_DETAIL_IS_RANGE_HPP_INCLUDED
- #if defined(_MSC_VER) && (_MSC_VER >= 1200)
- # pragma once
- #endif
- #include <cstddef>
- #include <boost/range/config.hpp>
- #include <boost/mpl/has_xxx.hpp>
- #include <boost/mpl/bool.hpp>
- #include <boost/mpl/and.hpp>
- namespace boost {
- namespace numeric {
- namespace odeint {
- namespace range_detail
- {
- BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator)
- BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator)
- }
- namespace detail
- {
- template< typename Range >
- struct is_range : boost::mpl::and_<range_detail::has_iterator<Range>, range_detail::has_const_iterator<Range> >
- {
- };
- template< typename iteratorT >
- struct is_range< std::pair<iteratorT,iteratorT> > : boost::mpl::true_
- {
- };
- template< typename iteratorT >
- struct is_range< const std::pair<iteratorT,iteratorT> > : boost::mpl::true_
- {
- };
- template< typename elementT, std::size_t sz >
- struct is_range< elementT[sz] > : boost::mpl::true_
- {
- };
- template< typename elementT, std::size_t sz >
- struct is_range< const elementT[sz] > : boost::mpl::true_
- {
- };
- template<>
- struct is_range< char* > : boost::mpl::true_
- {
- };
- template<>
- struct is_range< wchar_t* > : boost::mpl::true_
- {
- };
- template<>
- struct is_range< const char* > : boost::mpl::true_
- {
- };
- template<>
- struct is_range< const wchar_t* > : boost::mpl::true_
- {
- };
- template<>
- struct is_range< char* const > : boost::mpl::true_
- {
- };
- template<>
- struct is_range< wchar_t* const > : boost::mpl::true_
- {
- };
- template<>
- struct is_range< const char* const > : boost::mpl::true_
- {
- };
- template<>
- struct is_range< const wchar_t* const > : boost::mpl::true_
- {
- };
- }
- }
- }
- }
- #endif
|