View Issue Details

IDProjectCategoryView StatusLast Update
0003479OpenFOAMBugpublic2020-04-10 16:09
Reportertniemi Assigned Tohenry  
Status resolvedResolutionfixed 
Product Versiondev 
Fixed in Versiondev 
Summary0003479: wordAndDictionary, compilation error with gcc older than v 7
DescriptionWhen compiling dev with an older gcc, the compilation fails with
"error: no matching function for call to ‘Foam::wordAndDictionary::wordAndDictionary()’"

It seems that the compiler is unable to find a constructor which takes no parameters for that class. The constructor is created with a using clause
using Tuple2<word, dictionary>::Tuple2;

Tupple2 does have such a constructor, so this is likely a compiler bug. While investigating, I found out that C++11 standard has been reworded regarding inheriting constructors and only gcc 7 or newer support this. The rewording seemed complicated, so I don't know if it is related to this or not, but at least it matches my observations when testing various compilers as v. 5 and 6 seemed to fail.

If the using-clause is replaced with a regular constuctor definition, the code compiles with older compilers.
Steps To ReproduceCompilations with 5.3.1, 5.4.0, 6.3.0 fail, 7.5.0 works.
TagsNo tags attached.



2020-04-10 16:09

manager   ~0011286

Resolved by commit b9c74286192892fa4711a9885f9739ac90abe14c

Issue History

Date Modified Username Field Change
2020-04-10 14:17 tniemi New Issue
2020-04-10 16:09 henry Assigned To => henry
2020-04-10 16:09 henry Status new => resolved
2020-04-10 16:09 henry Resolution open => fixed
2020-04-10 16:09 henry Fixed in Version => dev
2020-04-10 16:09 henry Note Added: 0011286