From 2f8ace4a49bc6077c7f7563b7a6880018859dd50 Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Fri, 8 Mar 2024 23:20:38 +0100
Subject: [PATCH] Replace MeshConcept by simple typename

gcc and clang-16 do not agree with syntax in case of friend concept
template functions...
---
 src/mesh/MeshFlatEdgeBoundary.cpp |  2 +-
 src/mesh/MeshFlatEdgeBoundary.hpp |  4 ++--
 src/mesh/MeshFlatFaceBoundary.cpp |  2 +-
 src/mesh/MeshFlatFaceBoundary.hpp |  4 ++--
 src/mesh/MeshFlatNodeBoundary.cpp |  2 +-
 src/mesh/MeshFlatNodeBoundary.hpp | 14 ++++++++------
 src/mesh/MeshLineEdgeBoundary.cpp |  2 +-
 src/mesh/MeshLineEdgeBoundary.hpp |  4 ++--
 src/mesh/MeshLineFaceBoundary.cpp |  2 +-
 src/mesh/MeshLineFaceBoundary.hpp |  4 ++--
 src/mesh/MeshLineNodeBoundary.cpp |  2 +-
 src/mesh/MeshLineNodeBoundary.hpp |  4 ++--
 12 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/src/mesh/MeshFlatEdgeBoundary.cpp b/src/mesh/MeshFlatEdgeBoundary.cpp
index c20b9c1a5..7a2d4918d 100644
--- a/src/mesh/MeshFlatEdgeBoundary.cpp
+++ b/src/mesh/MeshFlatEdgeBoundary.cpp
@@ -4,7 +4,7 @@
 #include <mesh/Mesh.hpp>
 #include <mesh/MeshFlatNodeBoundary.hpp>
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshFlatEdgeBoundary<MeshType>
 getMeshFlatEdgeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor)
 {
diff --git a/src/mesh/MeshFlatEdgeBoundary.hpp b/src/mesh/MeshFlatEdgeBoundary.hpp
index 10ab8edb8..70b51bc98 100644
--- a/src/mesh/MeshFlatEdgeBoundary.hpp
+++ b/src/mesh/MeshFlatEdgeBoundary.hpp
@@ -24,7 +24,7 @@ class MeshFlatEdgeBoundary final : public MeshEdgeBoundary   // clazy:exclude=co
   MeshFlatEdgeBoundary& operator=(const MeshFlatEdgeBoundary&) = default;
   MeshFlatEdgeBoundary& operator=(MeshFlatEdgeBoundary&&)      = default;
 
-  template <MeshConcept MeshTypeT>
+  template <typename MeshTypeT>
   friend MeshFlatEdgeBoundary<MeshTypeT> getMeshFlatEdgeBoundary(const MeshTypeT& mesh,
                                                                  const IBoundaryDescriptor& boundary_descriptor);
 
@@ -40,7 +40,7 @@ class MeshFlatEdgeBoundary final : public MeshEdgeBoundary   // clazy:exclude=co
   ~MeshFlatEdgeBoundary()                           = default;
 };
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshFlatEdgeBoundary<MeshType> getMeshFlatEdgeBoundary(const MeshType& mesh,
                                                        const IBoundaryDescriptor& boundary_descriptor);
 
diff --git a/src/mesh/MeshFlatFaceBoundary.cpp b/src/mesh/MeshFlatFaceBoundary.cpp
index 632c6a033..2ecdf6768 100644
--- a/src/mesh/MeshFlatFaceBoundary.cpp
+++ b/src/mesh/MeshFlatFaceBoundary.cpp
@@ -4,7 +4,7 @@
 #include <mesh/Mesh.hpp>
 #include <mesh/MeshFlatNodeBoundary.hpp>
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshFlatFaceBoundary<MeshType>
 getMeshFlatFaceBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor)
 {
diff --git a/src/mesh/MeshFlatFaceBoundary.hpp b/src/mesh/MeshFlatFaceBoundary.hpp
index 0c53a31e0..fc4d9d0f8 100644
--- a/src/mesh/MeshFlatFaceBoundary.hpp
+++ b/src/mesh/MeshFlatFaceBoundary.hpp
@@ -24,7 +24,7 @@ class MeshFlatFaceBoundary final : public MeshFaceBoundary   // clazy:exclude=co
   MeshFlatFaceBoundary& operator=(const MeshFlatFaceBoundary&) = default;
   MeshFlatFaceBoundary& operator=(MeshFlatFaceBoundary&&)      = default;
 
-  template <MeshConcept MeshTypeT>
+  template <typename MeshTypeT>
   friend MeshFlatFaceBoundary<MeshTypeT> getMeshFlatFaceBoundary(const MeshTypeT& mesh,
                                                                  const IBoundaryDescriptor& boundary_descriptor);
 
@@ -40,7 +40,7 @@ class MeshFlatFaceBoundary final : public MeshFaceBoundary   // clazy:exclude=co
   ~MeshFlatFaceBoundary()                           = default;
 };
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshFlatFaceBoundary<MeshType> getMeshFlatFaceBoundary(const MeshType& mesh,
                                                        const IBoundaryDescriptor& boundary_descriptor);
 
diff --git a/src/mesh/MeshFlatNodeBoundary.cpp b/src/mesh/MeshFlatNodeBoundary.cpp
index bdc7c20a2..c3ca1dbd4 100644
--- a/src/mesh/MeshFlatNodeBoundary.cpp
+++ b/src/mesh/MeshFlatNodeBoundary.cpp
@@ -323,7 +323,7 @@ MeshFlatNodeBoundary<Mesh<3>>::_getOutgoingNormal(const Mesh<3>& mesh)
   }
 }
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshFlatNodeBoundary<MeshType>
 getMeshFlatNodeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor)
 {
diff --git a/src/mesh/MeshFlatNodeBoundary.hpp b/src/mesh/MeshFlatNodeBoundary.hpp
index 2eb28d148..66c610ea7 100644
--- a/src/mesh/MeshFlatNodeBoundary.hpp
+++ b/src/mesh/MeshFlatNodeBoundary.hpp
@@ -20,21 +20,23 @@ class [[nodiscard]] MeshFlatNodeBoundary final : public MeshNodeBoundary   // cl
   Rd _getNormal(const MeshType& mesh);
 
   void _checkBoundaryIsFlat(const TinyVector<MeshType::Dimension, double>& normal,
-                            const TinyVector<MeshType::Dimension, double>& origin, const double length,
+                            const TinyVector<MeshType::Dimension, double>& origin,
+                            const double length,
                             const MeshType& mesh) const;
 
   Rd _getOutgoingNormal(const MeshType& mesh);
 
  public:
-  const Rd& outgoingNormal() const
+  const Rd&
+  outgoingNormal() const
   {
     return m_outgoing_normal;
   }
 
   MeshFlatNodeBoundary& operator=(const MeshFlatNodeBoundary&) = default;
-  MeshFlatNodeBoundary& operator=(MeshFlatNodeBoundary&&) = default;
+  MeshFlatNodeBoundary& operator=(MeshFlatNodeBoundary&&)      = default;
 
-  template <MeshConcept MeshTypeT>
+  template <typename MeshTypeT>
   friend MeshFlatNodeBoundary<MeshTypeT> getMeshFlatNodeBoundary(const MeshTypeT& mesh,
                                                                  const IBoundaryDescriptor& boundary_descriptor);
 
@@ -50,11 +52,11 @@ class [[nodiscard]] MeshFlatNodeBoundary final : public MeshNodeBoundary   // cl
  public:
   MeshFlatNodeBoundary()                            = default;
   MeshFlatNodeBoundary(const MeshFlatNodeBoundary&) = default;
-  MeshFlatNodeBoundary(MeshFlatNodeBoundary &&)     = default;
+  MeshFlatNodeBoundary(MeshFlatNodeBoundary&&)      = default;
   ~MeshFlatNodeBoundary()                           = default;
 };
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshFlatNodeBoundary<MeshType> getMeshFlatNodeBoundary(const MeshType& mesh,
                                                        const IBoundaryDescriptor& boundary_descriptor);
 
diff --git a/src/mesh/MeshLineEdgeBoundary.cpp b/src/mesh/MeshLineEdgeBoundary.cpp
index 40de23d1e..f1e0333a9 100644
--- a/src/mesh/MeshLineEdgeBoundary.cpp
+++ b/src/mesh/MeshLineEdgeBoundary.cpp
@@ -5,7 +5,7 @@
 #include <mesh/MeshLineNodeBoundary.hpp>
 #include <utils/Messenger.hpp>
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshLineEdgeBoundary<MeshType>
 getMeshLineEdgeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor)
 {
diff --git a/src/mesh/MeshLineEdgeBoundary.hpp b/src/mesh/MeshLineEdgeBoundary.hpp
index 0fc5db0ba..11994eefa 100644
--- a/src/mesh/MeshLineEdgeBoundary.hpp
+++ b/src/mesh/MeshLineEdgeBoundary.hpp
@@ -18,7 +18,7 @@ class [[nodiscard]] MeshLineEdgeBoundary final : public MeshEdgeBoundary   // cl
   const Rd m_direction;
 
  public:
-  template <MeshConcept MeshTypeT>
+  template <typename MeshTypeT>
   friend MeshLineEdgeBoundary<MeshTypeT> getMeshLineEdgeBoundary(const MeshTypeT& mesh,
                                                                  const IBoundaryDescriptor& boundary_descriptor);
 
@@ -44,7 +44,7 @@ class [[nodiscard]] MeshLineEdgeBoundary final : public MeshEdgeBoundary   // cl
   ~MeshLineEdgeBoundary()                           = default;
 };
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshLineEdgeBoundary<MeshType> getMeshLineEdgeBoundary(const MeshType& mesh,
                                                        const IBoundaryDescriptor& boundary_descriptor);
 
diff --git a/src/mesh/MeshLineFaceBoundary.cpp b/src/mesh/MeshLineFaceBoundary.cpp
index 3608e7aef..81ea991ed 100644
--- a/src/mesh/MeshLineFaceBoundary.cpp
+++ b/src/mesh/MeshLineFaceBoundary.cpp
@@ -5,7 +5,7 @@
 #include <mesh/MeshLineNodeBoundary.hpp>
 #include <utils/Messenger.hpp>
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshLineFaceBoundary<MeshType>
 getMeshLineFaceBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor)
 {
diff --git a/src/mesh/MeshLineFaceBoundary.hpp b/src/mesh/MeshLineFaceBoundary.hpp
index 206961a08..5b993923c 100644
--- a/src/mesh/MeshLineFaceBoundary.hpp
+++ b/src/mesh/MeshLineFaceBoundary.hpp
@@ -17,7 +17,7 @@ class [[nodiscard]] MeshLineFaceBoundary final : public MeshFaceBoundary   // cl
   const Rd m_direction;
 
  public:
-  template <MeshConcept MeshTypeT>
+  template <typename MeshTypeT>
   friend MeshLineFaceBoundary<MeshTypeT> getMeshLineFaceBoundary(const MeshTypeT& mesh,
                                                                  const IBoundaryDescriptor& boundary_descriptor);
 
@@ -43,7 +43,7 @@ class [[nodiscard]] MeshLineFaceBoundary final : public MeshFaceBoundary   // cl
   ~MeshLineFaceBoundary()                           = default;
 };
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshLineFaceBoundary<MeshType> getMeshLineFaceBoundary(const MeshType& mesh,
                                                        const IBoundaryDescriptor& boundary_descriptor);
 
diff --git a/src/mesh/MeshLineNodeBoundary.cpp b/src/mesh/MeshLineNodeBoundary.cpp
index 1cd3bb64d..7ec8bb898 100644
--- a/src/mesh/MeshLineNodeBoundary.cpp
+++ b/src/mesh/MeshLineNodeBoundary.cpp
@@ -105,7 +105,7 @@ MeshLineNodeBoundary<Mesh<3>>::_getDirection(const Mesh<3>& mesh)
   return direction;
 }
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshLineNodeBoundary<MeshType>
 getMeshLineNodeBoundary(const MeshType& mesh, const IBoundaryDescriptor& boundary_descriptor)
 {
diff --git a/src/mesh/MeshLineNodeBoundary.hpp b/src/mesh/MeshLineNodeBoundary.hpp
index fb75ef9a4..95cbab34c 100644
--- a/src/mesh/MeshLineNodeBoundary.hpp
+++ b/src/mesh/MeshLineNodeBoundary.hpp
@@ -24,7 +24,7 @@ class [[nodiscard]] MeshLineNodeBoundary final : public MeshNodeBoundary   // cl
                             const MeshType& mesh) const;
 
  public:
-  template <MeshConcept MeshTypeT>
+  template <typename MeshTypeT>
   friend MeshLineNodeBoundary<MeshTypeT> getMeshLineNodeBoundary(const MeshTypeT& mesh,
                                                                  const IBoundaryDescriptor& boundary_descriptor);
 
@@ -58,7 +58,7 @@ class [[nodiscard]] MeshLineNodeBoundary final : public MeshNodeBoundary   // cl
   ~MeshLineNodeBoundary()                           = default;
 };
 
-template <MeshConcept MeshType>
+template <typename MeshType>
 MeshLineNodeBoundary<MeshType> getMeshLineNodeBoundary(const MeshType& mesh,
                                                        const IBoundaryDescriptor& boundary_descriptor);
 
-- 
GitLab