File indexing completed on 2025-07-15 08:41:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef BOOST_NUMERIC_ODEINT_UTIL_IS_RESIZEABLE_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_UTIL_IS_RESIZEABLE_HPP_INCLUDED
0020
0021
0022 #include <vector>
0023 #include <type_traits>
0024
0025 #include <boost/type_traits/integral_constant.hpp>
0026 #include <boost/type_traits/remove_reference.hpp>
0027 #include <boost/fusion/include/front.hpp>
0028 #include <boost/fusion/include/is_sequence.hpp>
0029
0030 #include <boost/mpl/find_if.hpp>
0031 #include <boost/mpl/end.hpp>
0032 #include <boost/mpl/placeholders.hpp>
0033 #include <boost/mpl/if.hpp>
0034 #include <boost/type_traits/is_same.hpp>
0035
0036 namespace boost {
0037 namespace numeric {
0038 namespace odeint {
0039
0040
0041
0042
0043 template< typename Container , typename Enabler = void >
0044 struct is_resizeable_sfinae : std::false_type {};
0045
0046 template< typename Container >
0047 struct is_resizeable : is_resizeable_sfinae< Container > {};
0048
0049
0050
0051
0052
0053
0054 template< class V, class A >
0055 struct is_resizeable< std::vector< V , A > > : std::true_type {};
0056
0057
0058
0059
0060
0061 template< typename FusionSequence >
0062 struct is_resizeable_sfinae<
0063 FusionSequence ,
0064 typename boost::enable_if< typename boost::fusion::traits::is_sequence< FusionSequence >::type >::type >
0065 {
0066 typedef typename boost::mpl::find_if< FusionSequence , is_resizeable< boost::mpl::_1 > >::type iter;
0067 typedef typename boost::mpl::end< FusionSequence >::type last;
0068
0069 typedef typename boost::mpl::if_< boost::is_same< iter , last > , std::false_type , std::true_type >::type type;
0070 const static bool value = type::value;
0071 };
0072
0073
0074
0075
0076
0077
0078 }
0079 }
0080 }
0081
0082
0083
0084 #endif