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_SAME_INSTANCE_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_UTIL_SAME_INSTANCE_HPP_INCLUDED
0020
0021 namespace boost {
0022 namespace numeric {
0023 namespace odeint {
0024
0025 template< class T1 , class T2 , class Enabler=void >
0026 struct same_instance_impl
0027 {
0028 static bool same_instance( const T1& , const T2& )
0029 {
0030 return false;
0031 }
0032 };
0033
0034 template< class T >
0035 struct same_instance_impl< T , T >
0036 {
0037 static bool same_instance( const T &x1 , const T &x2 )
0038 {
0039
0040 return (&x1 == &x2);
0041 }
0042 };
0043
0044
0045 template< class T1 , class T2 >
0046 bool same_instance( const T1 &x1 , const T2 &x2 )
0047 {
0048 return same_instance_impl< T1 , T2 >::same_instance( x1 , x2 );
0049 }
0050
0051
0052 }
0053 }
0054 }
0055
0056 #endif