Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/numeric/odeint/util/same_instance.hpp @ 125:34e428693f5d vext
Vext -> Repoint
author | Chris Cannam |
---|---|
date | Thu, 14 Jun 2018 11:15:39 +0100 |
parents | c530137014c0 |
children |
rev | line source |
---|---|
Chris@16 | 1 /* |
Chris@16 | 2 [auto_generated] |
Chris@16 | 3 boost/numeric/odeint/util/same_instance.hpp |
Chris@16 | 4 |
Chris@16 | 5 [begin_description] |
Chris@16 | 6 Basic check if two variables are the same instance |
Chris@16 | 7 [end_description] |
Chris@16 | 8 |
Chris@101 | 9 Copyright 2012 Karsten Ahnert |
Chris@101 | 10 Copyright 2012 Mario Mulansky |
Chris@16 | 11 |
Chris@16 | 12 Distributed under the Boost Software License, Version 1.0. |
Chris@16 | 13 (See accompanying file LICENSE_1_0.txt or |
Chris@16 | 14 copy at http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 15 */ |
Chris@16 | 16 |
Chris@16 | 17 |
Chris@16 | 18 #ifndef BOOST_NUMERIC_ODEINT_UTIL_SAME_INSTANCE_HPP_INCLUDED |
Chris@16 | 19 #define BOOST_NUMERIC_ODEINT_UTIL_SAME_INSTANCE_HPP_INCLUDED |
Chris@16 | 20 |
Chris@16 | 21 namespace boost { |
Chris@16 | 22 namespace numeric { |
Chris@16 | 23 namespace odeint { |
Chris@16 | 24 |
Chris@16 | 25 template< class T1 , class T2 , class Enabler=void > |
Chris@16 | 26 struct same_instance_impl |
Chris@16 | 27 { |
Chris@101 | 28 static bool same_instance( const T1& /* x1 */ , const T2& /* x2 */ ) |
Chris@16 | 29 { |
Chris@16 | 30 return false; |
Chris@16 | 31 } |
Chris@16 | 32 }; |
Chris@16 | 33 |
Chris@16 | 34 template< class T > |
Chris@16 | 35 struct same_instance_impl< T , T > |
Chris@16 | 36 { |
Chris@16 | 37 static bool same_instance( const T &x1 , const T &x2 ) |
Chris@16 | 38 { |
Chris@16 | 39 // check pointers |
Chris@16 | 40 return (&x1 == &x2); |
Chris@16 | 41 } |
Chris@16 | 42 }; |
Chris@16 | 43 |
Chris@16 | 44 |
Chris@16 | 45 template< class T1 , class T2 > |
Chris@16 | 46 bool same_instance( const T1 &x1 , const T2 &x2 ) |
Chris@16 | 47 { |
Chris@16 | 48 return same_instance_impl< T1 , T2 >::same_instance( x1 , x2 ); |
Chris@16 | 49 } |
Chris@16 | 50 |
Chris@16 | 51 |
Chris@16 | 52 } // namespace odeint |
Chris@16 | 53 } // namespace numeric |
Chris@16 | 54 } // namespace boost |
Chris@16 | 55 |
Chris@16 | 56 #endif |