Skip to content
Snippets Groups Projects
Commit a83f8fb1 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add {TinyVector,TinyMatrix}::data_type typename

This allows to access to the type of embedded data
parent 01c0507f
No related branches found
No related tags found
1 merge request!11Feature/mpi
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
template <size_t N, typename T=double> template <size_t N, typename T=double>
class TinyMatrix class TinyMatrix
{ {
public:
using data_type = T;
private: private:
T m_values[N*N]; T m_values[N*N];
static_assert((N>0),"TinyMatrix size must be strictly positive"); static_assert((N>0),"TinyMatrix size must be strictly positive");
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
template <size_t N, typename T=double> template <size_t N, typename T=double>
class TinyVector class TinyVector
{ {
public:
using data_type = T;
private: private:
T m_values[N]; T m_values[N];
static_assert((N>0),"TinyVector size must be strictly positive"); static_assert((N>0),"TinyVector size must be strictly positive");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment