From 84bdcedb33581f64459605e8414b3a98a57e4bdc Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Thu, 9 Jun 2011 11:58:16 +0100
Subject: [PATCH] Changes to template specialization specification for the
 latest clang version.

---
 src/OpenFOAM/db/IOstreams/token/token.H              |  3 +--
 .../polyPatches/constraint/cyclic/cyclicPolyPatch.C  |  6 ++++--
 src/triSurface/triSurfaceFields/triSurfaceFields.C   | 12 ++++++++++++
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/OpenFOAM/db/IOstreams/token/token.H b/src/OpenFOAM/db/IOstreams/token/token.H
index 0497c75e8d4..0c70cdc82e7 100644
--- a/src/OpenFOAM/db/IOstreams/token/token.H
+++ b/src/OpenFOAM/db/IOstreams/token/token.H
@@ -435,8 +435,7 @@ Ostream& operator<<(Ostream&, const token::compound&);
 
 
 #define defineCompoundTypeName(Type, Name)                                    \
-    typedef token::Compound<Type> tokenCompound##Name##_;                     \
-    defineTemplateTypeNameAndDebugWithName(tokenCompound##Name##_, #Type, 0);
+    defineTemplateTypeNameAndDebugWithName(token::Compound<Type>, #Type, 0);
 
 #define addCompoundToRunTimeSelectionTable(Type, Name)                        \
     token::compound::addIstreamConstructorToTable<token::Compound<Type> >     \
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
index 352a826cab0..51f0887b5ec 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
@@ -573,8 +573,10 @@ Foam::label Foam::cyclicPolyPatch::getConsistentRotationFace
 {
     // Determine a face furthest away from the axis
 
-    const scalarField magRadSqr =
-        magSqr((faceCentres - rotationCentre_) ^ rotationAxis_);
+    const scalarField magRadSqr
+    (
+        magSqr((faceCentres - rotationCentre_) ^ rotationAxis_)
+    );
 
     label rotFace = findMax(magRadSqr);
 
diff --git a/src/triSurface/triSurfaceFields/triSurfaceFields.C b/src/triSurface/triSurfaceFields/triSurfaceFields.C
index 71ad3d24bd8..9ef99d19b82 100644
--- a/src/triSurface/triSurfaceFields/triSurfaceFields.C
+++ b/src/triSurface/triSurfaceFields/triSurfaceFields.C
@@ -32,24 +32,36 @@ namespace Foam
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
+#ifndef __clang__
 template<>
+#endif
 const word triSurfaceLabelField::typeName("triSurfaceLabelField");
 
+#ifndef __clang__
 template<>
+#endif
 const word triSurfaceScalarField::typeName("triSurfaceScalarField");
 
+#ifndef __clang__
 template<>
+#endif
 const word triSurfaceVectorField::typeName("triSurfaceVectorField");
 
+#ifndef __clang__
 template<>
+#endif
 const word triSurfaceSphericalTensorField::typeName
 ("triSurfaceSphericalTensorField");
 
+#ifndef __clang__
 template<>
+#endif
 const word triSurfaceSymmTensorField::typeName
 ("triSurfaceSymmTensorField");
 
+#ifndef __clang__
 template<>
+#endif
 const word triSurfaceTensorField::typeName("triSurfaceTensorField");
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-- 
GitLab