From 89f6d2905c8ab1dd99d6bdd3b86560e026b24479 Mon Sep 17 00:00:00 2001 From: Oliver Ruebel Date: Wed, 18 Sep 2024 22:41:28 -0700 Subject: [PATCH] Fix static assert for ReadDataWrapper --- src/io/ReadIO.hpp | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/io/ReadIO.hpp b/src/io/ReadIO.hpp index c5bf5b90..72d90182 100644 --- a/src/io/ReadIO.hpp +++ b/src/io/ReadIO.hpp @@ -157,6 +157,29 @@ class DataBlock } }; +/// Helper struct to check if a StorageObjectType is allowed. Used in static +/// assert. +template +struct is_allowed_storage_object_type : std::false_type +{ +}; + +/// Helper struct to check if a StorageObjectType is allowed. Used in static +/// assert. +template<> +struct is_allowed_storage_object_type + : std::true_type +{ +}; + +/// Helper struct to check if a StorageObjectType is allowed. Used in static +/// assert. +template<> +struct is_allowed_storage_object_type + : std::true_type +{ +}; + /** * @brief Class for wrapping data objects (datasets or attributes) for reading * data from a file @@ -182,29 +205,6 @@ class ReadDataWrapper { }; - /// Helper struct to check if a StorageObjectType is allowed. Used in static - /// assert. - template - struct is_allowed_storage_object_type : std::false_type - { - }; - - /// Helper struct to check if a StorageObjectType is allowed. Used in static - /// assert. - template<> - struct is_allowed_storage_object_type - : std::true_type - { - }; - - /// Helper struct to check if a StorageObjectType is allowed. Used in static - /// assert. - template<> - struct is_allowed_storage_object_type - : std::true_type - { - }; - /** * Static assert to enforce the restriction that ReadDataWrapper can only be * instantiated for OTYPE of StorageObjectType::Dataset and