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

Add default constructor

parent dffffa3b
No related branches found
No related tags found
1 merge request!11Feature/mpi
...@@ -7,6 +7,8 @@ template <typename DataType, ...@@ -7,6 +7,8 @@ template <typename DataType,
typename CastDataType> typename CastDataType>
class CastArray class CastArray
{ {
public:
using data_type = CastDataType;
private: private:
const Array<DataType> m_array; const Array<DataType> m_array;
const size_t m_size; const size_t m_size;
...@@ -26,6 +28,20 @@ class CastArray ...@@ -26,6 +28,20 @@ class CastArray
return m_values[i]; return m_values[i];
} }
PASTIS_INLINE
CastArray& operator=(const CastArray&) = default;
PASTIS_INLINE
CastArray& operator=(CastArray&&) = default;
PASTIS_INLINE
CastArray()
: m_size(0),
m_values(nullptr)
{
;
}
PASTIS_INLINE PASTIS_INLINE
CastArray(const Array<DataType>& array) CastArray(const Array<DataType>& array)
: m_array (array), : m_array (array),
...@@ -47,12 +63,6 @@ class CastArray ...@@ -47,12 +63,6 @@ class CastArray
PASTIS_INLINE PASTIS_INLINE
CastArray(CastArray&&) = default; CastArray(CastArray&&) = default;
PASTIS_INLINE
CastArray& operator=(const CastArray&) = default;
PASTIS_INLINE
CastArray& operator=(CastArray&&) = default;
PASTIS_INLINE PASTIS_INLINE
~CastArray() = default; ~CastArray() = default;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment