File indexing completed on 2025-01-18 09:42:58
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
0024 #include <boost/type_traits/integral_constant.hpp>
0025 #include <boost/type_traits/remove_reference.hpp>
0026 #include <boost/fusion/include/front.hpp>
0027 #include <boost/fusion/include/is_sequence.hpp>
0028
0029 #include <boost/mpl/find_if.hpp>
0030 #include <boost/mpl/end.hpp>
0031 #include <boost/mpl/placeholders.hpp>
0032 #include <boost/mpl/if.hpp>
0033 #include <boost/type_traits/is_same.hpp>
0034
0035 namespace boost {
0036 namespace numeric {
0037 namespace odeint {
0038
0039
0040
0041
0042 template< typename Container , typename Enabler = void >
0043 struct is_resizeable_sfinae : boost::false_type {};
0044
0045 template< typename Container >
0046 struct is_resizeable : is_resizeable_sfinae< Container > {};
0047
0048
0049
0050
0051
0052
0053 template< class V, class A >
0054 struct is_resizeable< std::vector< V , A > > : boost::true_type {};
0055
0056
0057
0058
0059
0060 template< typename FusionSequence >
0061 struct is_resizeable_sfinae<
0062 FusionSequence ,
0063 typename boost::enable_if< typename boost::fusion::traits::is_sequence< FusionSequence >::type >::type >
0064 {
0065 typedef typename boost::mpl::find_if< FusionSequence , is_resizeable< boost::mpl::_1 > >::type iter;
0066 typedef typename boost::mpl::end< FusionSequence >::type last;
0067
0068 typedef typename boost::mpl::if_< boost::is_same< iter , last > , boost::false_type , boost::true_type >::type type;
0069 const static bool value = type::value;
0070 };
0071
0072
0073
0074
0075
0076
0077 }
0078 }
0079 }
0080
0081
0082
0083 #endif