From 7cca763d3bae7d5178d69d170c39a010ec4cf985 Mon Sep 17 00:00:00 2001 From: Frederik Hennig 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 9d171610..5888bad3 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 9c1f9b7b..294f3551 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 98cfbb00..a09f40cd 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 4c3dc0cd..5d55c7fe 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 b234a89d..5df290d2 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 e3e6a283..318752ea 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 896c8c49..32dab37b 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 a7a520f6..60778938 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 6ba403bd..74b986f4 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 8b9f81d3..249b4dc5 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 8e14c9b0..33ecb5b1 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 1c4982c9..e0457953 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 893ad59a..4443d823 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 47291f67..263d7077 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. //====================================================================================================================