summaryrefslogtreecommitdiff
path: root/boost/numeric/odeint/algebra/algebra_dispatcher.hpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-08 03:09:47 +0000
committer <>2015-05-05 14:37:32 +0000
commitf2541bb90af059680aa7036f315f052175999355 (patch)
treea5b214744b256f07e1dc2bd7273035a7808c659f /boost/numeric/odeint/algebra/algebra_dispatcher.hpp
parented232fdd34968697a68783b3195b1da4226915b5 (diff)
downloadboost-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'boost/numeric/odeint/algebra/algebra_dispatcher.hpp')
-rw-r--r--boost/numeric/odeint/algebra/algebra_dispatcher.hpp29
1 files changed, 26 insertions, 3 deletions
diff --git a/boost/numeric/odeint/algebra/algebra_dispatcher.hpp b/boost/numeric/odeint/algebra/algebra_dispatcher.hpp
index df5aabac9..88cf159e0 100644
--- a/boost/numeric/odeint/algebra/algebra_dispatcher.hpp
+++ b/boost/numeric/odeint/algebra/algebra_dispatcher.hpp
@@ -17,8 +17,9 @@
#ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_ALGEBRA_DISPATCHER_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_ALGEBRA_ALGEBRA_DISPATCHER_HPP_INCLUDED
-#include <complex>
+#include <boost/numeric/odeint/config.hpp>
+#include <complex>
#include <boost/type_traits/is_floating_point.hpp>
#include <boost/numeric/ublas/vector.hpp>
@@ -38,14 +39,14 @@ namespace odeint {
template< class StateType , class Enabler = void >
struct algebra_dispatcher_sfinae
{
- // range_algebra is the standard algebra^
+ // range_algebra is the standard algebra
typedef range_algebra algebra_type;
};
template< class StateType >
struct algebra_dispatcher : algebra_dispatcher_sfinae< StateType > { };
-//specialize for array
+// specialize for array
template< class T , size_t N >
struct algebra_dispatcher< boost::array< T , N > >
{
@@ -84,4 +85,26 @@ struct algebra_dispatcher< boost::numeric::ublas::matrix< T , L , A > >
}
}
+#ifdef BOOST_NUMERIC_ODEINT_CXX11
+
+// c++11 mode: specialization for std::array if available
+
+#include <array>
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+// specialize for std::array
+template< class T , size_t N >
+struct algebra_dispatcher< std::array< T , N > >
+{
+ typedef array_algebra algebra_type;
+};
+
+} } }
+
+#endif
+
+
#endif