1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #ifndef BOOST_NUMERIC_ODEINT_UTIL_IS_RESIZEABLE_HPP_INCLUDED
- #define BOOST_NUMERIC_ODEINT_UTIL_IS_RESIZEABLE_HPP_INCLUDED
- #include <vector>
- #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 : boost::false_type {};
- template< typename Container >
- struct is_resizeable : is_resizeable_sfinae< Container > {};
- template< class V, class A >
- struct is_resizeable< std::vector< V , A > > : boost::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 > , boost::false_type , boost::true_type >::type type;
- const static bool value = type::value;
- };
- }
- }
- }
- #endif
|