View Issue Details

IDProjectCategoryView StatusLast Update
0001766OpenFOAM[All Projects] Bugpublic2015-06-29 14:20
Reporterhk318iAssigned Tohenry 
PriorityhighSeveritymajorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformUnixOSLinuxOS VersionCentOS release 6
Product Versiondev 
Fixed in Version 
Summary0001766: Compiler error in localEulerDdtScheme
DescriptionI was trying to compile the latest OpenFOAM-dev and I got the following error

finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdt.C: In static member function ‘static const volScalarField& Foam::fv::localEulerDdt::localRDeltaT(const Foam::fvMesh&)’:
finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdt.C:41:33: error: ‘template’ (as a disambiguator) is only allowed within templates
cc1plus: error: expected unqualified-id before ‘’
cc1plus: error: expected ‘;’ before ‘’
cc1plus: error: expected primary-expression before ‘’
cc1plus: error: expected ‘;’ before ‘’
finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdt.C: In static member function ‘static Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fv::localEulerDdt::localRSubDeltaT(const Foam::fvMesh&, Foam::label)’:
finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdt.C:60:34: error: ‘template’ (as a disambiguator) is only allowed within templates
finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdt.C:55:5: error: expected primary-expression before ‘(’ token
finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdt.C:66:1: warning: control reaches end of non-void function [-Wreturn-type]
finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdt.C: In static member function ‘static const volScalarField& Foam::fv::localEulerDdt::localRDeltaT(const Foam::fvMesh&)’:
finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdt.C:45:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [/home/abfb165/OpenFOAM/OpenFOAM-dev/platforms/linux64GccDPInt32Opt/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdt.o] Error 1
Additional Informationlatest commit
commit 5e3a0cdbbd4ba1e7c167f09953f132791cc670f9
Author: Henry Weller <http://cfd.direct>
Date: Sun Jun 28 22:55:22 2015 +0100

gcc version 4.7.3
TagsNo tags attached.

Activities

hk318i

2015-06-29 13:25

reporter   ~0005013

I think just removing template keyword from both functions will solve this issue.

henry

2015-06-29 14:20

manager   ~0005014

Resolved by commit b8465c8469dea19bf4ab32bde1d8f5e1ce296231

Issue History

Date Modified Username Field Change
2015-06-29 13:05 hk318i New Issue
2015-06-29 13:25 hk318i Note Added: 0005013
2015-06-29 14:20 henry Note Added: 0005014
2015-06-29 14:20 henry Status new => resolved
2015-06-29 14:20 henry Resolution open => fixed
2015-06-29 14:20 henry Assigned To => henry