From a83f8fb1ee247db1ac8c3ef4c5a7a2f9694cec93 Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Fri, 22 Feb 2019 18:14:59 +0100
Subject: [PATCH] Add {TinyVector,TinyMatrix}::data_type typename

This allows to access to the type of embedded data
---
 src/algebra/TinyMatrix.hpp | 5 ++++-
 src/algebra/TinyVector.hpp | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/algebra/TinyMatrix.hpp b/src/algebra/TinyMatrix.hpp
index 9fd69705b..faf177c5e 100644
--- a/src/algebra/TinyMatrix.hpp
+++ b/src/algebra/TinyMatrix.hpp
@@ -12,7 +12,10 @@
 template <size_t N, typename T=double>
 class TinyMatrix
 {
-private:
+ public:
+  using data_type = T;
+
+ private:
   T m_values[N*N];
   static_assert((N>0),"TinyMatrix size must be strictly positive");
 
diff --git a/src/algebra/TinyVector.hpp b/src/algebra/TinyVector.hpp
index 6d833e6b3..2b7a080ca 100644
--- a/src/algebra/TinyVector.hpp
+++ b/src/algebra/TinyVector.hpp
@@ -13,6 +13,9 @@
 template <size_t N, typename T=double>
 class TinyVector
 {
+ public:
+  using data_type = T;
+
  private:
   T m_values[N];
   static_assert((N>0),"TinyVector size must be strictly positive");
-- 
GitLab