From 01fa2c35f751a49d4be348a68f5493e65e7c3e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Mon, 23 Oct 2023 15:21:21 +0200 Subject: [PATCH] Remove duplication of std::variant definition --- include/openPMD/auxiliary/Variant.hpp | 4 +-- include/openPMD/backend/Attribute.hpp | 42 +-------------------------- 2 files changed, 3 insertions(+), 43 deletions(-) diff --git a/include/openPMD/auxiliary/Variant.hpp b/include/openPMD/auxiliary/Variant.hpp index 89190b882e..0c0363fc7c 100644 --- a/include/openPMD/auxiliary/Variant.hpp +++ b/include/openPMD/auxiliary/Variant.hpp @@ -35,7 +35,7 @@ namespace auxiliary * @tparam T Varaidic template argument list of datatypes to be * stored. */ - template + template class Variant { static_assert( @@ -43,7 +43,7 @@ namespace auxiliary "Datatypes to Variant must be supplied as enum."); public: - using resource = std::variant; + using resource = std_variant; /** Construct a lightweight wrapper around a generic object that * indicates the concrete datatype of the specific object stored. * diff --git a/include/openPMD/backend/Attribute.hpp b/include/openPMD/backend/Attribute.hpp index c34d7c1847..6306bcaaf2 100644 --- a/include/openPMD/backend/Attribute.hpp +++ b/include/openPMD/backend/Attribute.hpp @@ -52,47 +52,7 @@ namespace openPMD * @note Extending and/or modifying the available formats requires identical * modifications to Datatype. */ -class Attribute - : public auxiliary::Variant< - Datatype, - char, - unsigned char, - signed char, - short, - int, - long, - long long, - unsigned short, - unsigned int, - unsigned long, - unsigned long long, - float, - double, - long double, - std::complex, - std::complex, - std::complex, - std::string, - std::vector, - std::vector, - std::vector, - std::vector, - std::vector, - std::vector, - std::vector, - std::vector, - std::vector, - std::vector, - std::vector, - std::vector, - std::vector, - std::vector>, - std::vector>, - std::vector>, - std::vector, - std::vector, - std::array, - bool> +class Attribute : public auxiliary::Variant { public: Attribute(resource r) : Variant(std::move(r))