123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #ifndef BOOST_NUMERIC_ODEINT_UTIL_IS_RESIZEABLE_HPP_INCLUDED
- #define BOOST_NUMERIC_ODEINT_UTIL_IS_RESIZEABLE_HPP_INCLUDED
- #include <vector>
- #include <type_traits>
- #include <boost/type_traits/integral_constant.hpp>
- #include <boost/type_traits/remove_reference.hpp>
- #include <boost/fusion/include/front.hpp>
- #include <boost/fusion/include/is_sequence.hpp>
- #include <boost/mpl/find_if.hpp>
- #include <boost/mpl/end.hpp>
- #include <boost/mpl/placeholders.hpp>
- #include <boost/mpl/if.hpp>
- #include <boost/type_traits/is_same.hpp>
- namespace boost {
- namespace numeric {
- namespace odeint {
-
- template< typename Container , typename Enabler = void >
- struct is_resizeable_sfinae : std::false_type {};
- template< typename Container >
- struct is_resizeable : is_resizeable_sfinae< Container > {};
- template< class V, class A >
- struct is_resizeable< std::vector< V , A > > : std::true_type {};
- template< typename FusionSequence >
- struct is_resizeable_sfinae<
- FusionSequence ,
- typename boost::enable_if< typename boost::fusion::traits::is_sequence< FusionSequence >::type >::type >
- {
- typedef typename boost::mpl::find_if< FusionSequence , is_resizeable< boost::mpl::_1 > >::type iter;
- typedef typename boost::mpl::end< FusionSequence >::type last;
- typedef typename boost::mpl::if_< boost::is_same< iter , last > , std::false_type , std::true_type >::type type;
- const static bool value = type::value;
- };
- }
- }
- }
- #endif
|