mirror of
https://github.com/boostorg/odeint.git
synced 2026-02-02 09:02:10 +00:00
adding two level specialization for is_resizeable
This commit is contained in:
committed by
alankelly
parent
d575761ead
commit
329dabcffc
@@ -39,6 +39,24 @@
|
||||
using namespace boost::unit_test;
|
||||
using namespace boost::numeric::odeint;
|
||||
|
||||
template< typename T > struct my_seq1 {};
|
||||
template< typename T > struct my_seq2 {};
|
||||
|
||||
namespace boost { namespace fusion { namespace traits {
|
||||
|
||||
template< typename T > struct is_sequence< my_seq1< T > > : boost::true_type {};
|
||||
template< typename T > struct is_sequence< my_seq2< T > > : boost::true_type {};
|
||||
} } } // boost::fusion::traits
|
||||
|
||||
namespace boost { namespace numeric { namespace odeint {
|
||||
|
||||
template< typename T >
|
||||
struct is_resizeable< my_seq2< T > > : boost::true_type {};
|
||||
|
||||
} } } // boost::numeric::odeint
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_vector )
|
||||
{
|
||||
BOOST_CHECK( is_resizeable< std::vector< int > >::value );
|
||||
@@ -86,3 +104,13 @@ BOOST_AUTO_TEST_CASE( test_fusion_quantity_sequence )
|
||||
|
||||
BOOST_CHECK( !( is_resizeable< state_type >::value ) );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_my_seq1 )
|
||||
{
|
||||
BOOST_CHECK( !is_resizeable< my_seq1< double > >::value );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( test_my_seq2 )
|
||||
{
|
||||
BOOST_CHECK( is_resizeable< my_seq2< double > >::value );
|
||||
}
|
||||
Reference in New Issue
Block a user