3 boost/numeric/odeint/util/same_instance.hpp
6 Basic check if two variables are the same instance
9 Copyright 2012 Karsten Ahnert
10 Copyright 2012 Mario Mulansky
12 Distributed under the Boost Software License, Version 1.0.
13 (See accompanying file LICENSE_1_0.txt or
14 copy at http://www.boost.org/LICENSE_1_0.txt)
18 #ifndef BOOST_NUMERIC_ODEINT_UTIL_SAME_INSTANCE_HPP_INCLUDED
19 #define BOOST_NUMERIC_ODEINT_UTIL_SAME_INSTANCE_HPP_INCLUDED
25 template< class T1 , class T2 , class Enabler=void >
26 struct same_instance_impl
28 static bool same_instance( const T1& /* x1 */ , const T2& /* x2 */ )
35 struct same_instance_impl< T , T >
37 static bool same_instance( const T &x1 , const T &x2 )
45 template< class T1 , class T2 >
46 bool same_instance( const T1 &x1 , const T2 &x2 )
48 return same_instance_impl< T1 , T2 >::same_instance( x1 , x2 );
53 } // namespace numeric