From 7cca763d3bae7d5178d69d170c39a010ec4cf985 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Tue, 23 Apr 2024 11:37:30 +0200 Subject: [PATCH] Fix stencil include guard problem (clang17 / c++20) --- src/stencil/D2CornerStencil.h | 4 ++-- src/stencil/D2Q4.h | 4 ++-- src/stencil/D2Q5.h | 4 ++-- src/stencil/D2Q9.h | 4 ++-- src/stencil/D3CornerStencil.h | 4 ++-- src/stencil/D3EdgeCornerStencil.h | 4 ++-- src/stencil/D3Q15.h | 4 ++-- src/stencil/D3Q19.h | 4 ++-- src/stencil/D3Q27.h | 4 ++-- src/stencil/D3Q6.h | 4 ++-- src/stencil/D3Q7.h | 4 ++-- src/stencil/EdgeStencil.h | 4 ++-- src/stencil/Stencil.in.h | 6 ++---- src/stencil/generate.py | 4 +++- 14 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/stencil/D2CornerStencil.h b/src/stencil/D2CornerStencil.h index 9d1716100..5888bad30 100644 --- a/src/stencil/D2CornerStencil.h +++ b/src/stencil/D2CornerStencil.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/D2Q4.h b/src/stencil/D2Q4.h index 9c1f9b7b7..294f35512 100644 --- a/src/stencil/D2Q4.h +++ b/src/stencil/D2Q4.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/D2Q5.h b/src/stencil/D2Q5.h index 98cfbb009..a09f40cdc 100644 --- a/src/stencil/D2Q5.h +++ b/src/stencil/D2Q5.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/D2Q9.h b/src/stencil/D2Q9.h index 4c3dc0cd9..5d55c7fe8 100644 --- a/src/stencil/D2Q9.h +++ b/src/stencil/D2Q9.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/D3CornerStencil.h b/src/stencil/D3CornerStencil.h index b234a89d0..5df290d22 100644 --- a/src/stencil/D3CornerStencil.h +++ b/src/stencil/D3CornerStencil.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/D3EdgeCornerStencil.h b/src/stencil/D3EdgeCornerStencil.h index e3e6a2832..318752ead 100644 --- a/src/stencil/D3EdgeCornerStencil.h +++ b/src/stencil/D3EdgeCornerStencil.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/D3Q15.h b/src/stencil/D3Q15.h index 896c8c49b..32dab37b9 100644 --- a/src/stencil/D3Q15.h +++ b/src/stencil/D3Q15.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/D3Q19.h b/src/stencil/D3Q19.h index a7a520f69..607789382 100644 --- a/src/stencil/D3Q19.h +++ b/src/stencil/D3Q19.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/D3Q27.h b/src/stencil/D3Q27.h index 6ba403bd5..74b986f4a 100644 --- a/src/stencil/D3Q27.h +++ b/src/stencil/D3Q27.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/D3Q6.h b/src/stencil/D3Q6.h index 8b9f81d3a..249b4dc54 100644 --- a/src/stencil/D3Q6.h +++ b/src/stencil/D3Q6.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/D3Q7.h b/src/stencil/D3Q7.h index 8e14c9b00..33ecb5b14 100644 --- a/src/stencil/D3Q7.h +++ b/src/stencil/D3Q7.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/EdgeStencil.h b/src/stencil/EdgeStencil.h index 1c4982c99..e04579530 100644 --- a/src/stencil/EdgeStencil.h +++ b/src/stencil/EdgeStencil.h @@ -1,10 +1,10 @@ +#pragma once + //==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== #ifndef DOXY_SKIP_INTERNAL -#pragma once - #include "Directions.h" #include "Iterator.h" diff --git a/src/stencil/Stencil.in.h b/src/stencil/Stencil.in.h index 893ad59ab..4443d8235 100644 --- a/src/stencil/Stencil.in.h +++ b/src/stencil/Stencil.in.h @@ -1,5 +1,3 @@ -#pragma once - #include "Directions.h" #include "Iterator.h" @@ -83,7 +81,7 @@ namespace stencil { /*! \name Iteration*/ //@{ - typedef stencil::Iterator<$name> iterator; + using iterator = stencil::Iterator<$name>; static iterator begin() { return iterator(0); } static iterator beginNoCenter() { return iterator(noCenterFirstIdx); } @@ -182,7 +180,7 @@ namespace stencil { } // namespace internal - typedef internal::$name<> $name; + using $name = internal::$name<>; } // namespace stencil } // namespace walberla diff --git a/src/stencil/generate.py b/src/stencil/generate.py index 47291f67d..263d7077d 100755 --- a/src/stencil/generate.py +++ b/src/stencil/generate.py @@ -80,7 +80,9 @@ def coordinateToDirection(coord): return directionStr -header = """//==================================================================================================================== +header = """#pragma once + +//==================================================================================================================== // Caution: This file has been generated automatically. All manual changes are lost when file is regenerated! // Changes should be done in Stencil.in.h,and then all stencils classes can be generated again. //==================================================================================================================== -- GitLab