summaryrefslogtreecommitdiff
path: root/modules/codec
diff options
context:
space:
mode:
Diffstat (limited to 'modules/codec')
-rw-r--r--modules/codec/c++/data_raw.hpp2
-rw-r--r--modules/codec/c++/schema.hpp4
-rw-r--r--modules/codec/tests/data_raw.cpp10
3 files changed, 15 insertions, 1 deletions
diff --git a/modules/codec/c++/data_raw.hpp b/modules/codec/c++/data_raw.hpp
index de5e7f0..88a0ee2 100644
--- a/modules/codec/c++/data_raw.hpp
+++ b/modules/codec/c++/data_raw.hpp
@@ -339,7 +339,7 @@ class data<schema::Array<T,Dim>, encode::NativeRaw> {
using DataType = std::conditional<
is_primitive<typename T>::value,
- typename native_data_type<T>::type
+ typename native_data_type<typename T::StorageSchema>::type
>;
private:
// data<schema::FixedArray<schema::UInt64, Dim>> dims_;
diff --git a/modules/codec/c++/schema.hpp b/modules/codec/c++/schema.hpp
index 3820cf3..40dfe39 100644
--- a/modules/codec/c++/schema.hpp
+++ b/modules/codec/c++/schema.hpp
@@ -318,4 +318,8 @@ template <class T, size_t Dim> struct is_array<schema::Array<T,Dim>> {
template <typename T, size_t N> struct is_primitive<schema::Primitive<T,N>> {
constexpr static bool value = true;
};
+
+template <typename TI, typename TS> struct is_primitive<schema::MixedPrecision<TI,TS>> {
+ constexpr static bool value = true;
+};
} // namespace saw
diff --git a/modules/codec/tests/data_raw.cpp b/modules/codec/tests/data_raw.cpp
new file mode 100644
index 0000000..99d55a8
--- /dev/null
+++ b/modules/codec/tests/data_raw.cpp
@@ -0,0 +1,10 @@
+#include <forstio/test/suite.hpp>
+#include "../c++/data_raw.hpp"
+
+namespace {
+namespace sch {
+using namespace saw::schema;
+}
+
+
+}