diff --git a/include/openPMD/DatatypeMacros.hpp b/include/openPMD/DatatypeMacros.hpp index aa78879aab..d72e86408f 100644 --- a/include/openPMD/DatatypeMacros.hpp +++ b/include/openPMD/DatatypeMacros.hpp @@ -18,7 +18,11 @@ * and the GNU Lesser General Public License along with openPMD-api. * If not, see . */ -#pragma once + +// sic! +// no #pragma once +// Since the macros can be un-defined with UndefDatatypeMacros.hpp, this header +// may be included multiple times into one translation unit #include #include @@ -89,7 +93,6 @@ using openpmd_array_double_7 = std::array; MACRO(std::complex) \ MACRO(std::complex) \ MACRO(std::string) \ - MACRO(array_double_7) \ MACRO(bool) #define OPENPMD_FOREACH_DATASET_DATATYPE(MACRO) \ @@ -109,5 +112,4 @@ using openpmd_array_double_7 = std::array; MACRO(long double) \ MACRO(std::complex) \ MACRO(std::complex) \ - MACRO(std::complex) \ - MACRO(std::array) + MACRO(std::complex) diff --git a/include/openPMD/backend/Attribute.hpp b/include/openPMD/backend/Attribute.hpp index 6306bcaaf2..58ca5821b2 100644 --- a/include/openPMD/backend/Attribute.hpp +++ b/include/openPMD/backend/Attribute.hpp @@ -21,10 +21,13 @@ #pragma once #include "openPMD/Datatype.hpp" -#include "openPMD/DatatypeMacros.hpp" #include "openPMD/auxiliary/TypeTraits.hpp" #include "openPMD/auxiliary/Variant.hpp" +// comment to prevent clang-format from moving this #include up +// datatype macros may be included and un-included in other headers +#include "openPMD/DatatypeMacros.hpp" + #include #include #include