mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: resolve abi:cxx11 linker issue (fixes #2147)
Issue first shows up on gcc-11 with these types of library symbols:
U Foam::tableReader<double>::dictionaryConstructorTablePtr_[abi:cxx11]
xx B Foam::tableReader<double>::dictionaryConstructorTablePtr_
Use concrete hasher functor for runtime selection tables, which
avoids any additional template resolutions (introduced with
95cd8ee75c). The library symbols now resolve _without_ an
additional abi:cxx11 tag.
This commit is contained in:
@ -52,8 +52,12 @@ Description
|
||||
typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList; \
|
||||
\
|
||||
/* Construct from argList function table type */ \
|
||||
typedef HashTable<argNames##ConstructorPtr, word> \
|
||||
argNames##ConstructorTable; \
|
||||
typedef HashTable \
|
||||
< \
|
||||
argNames##ConstructorPtr, \
|
||||
::Foam::word, \
|
||||
::Foam::string::hasher \
|
||||
> argNames##ConstructorTable; \
|
||||
\
|
||||
/* Construct from argList function pointer table pointer */ \
|
||||
static argNames##ConstructorTable* argNames##ConstructorTablePtr_; \
|
||||
@ -77,7 +81,7 @@ Description
|
||||
\
|
||||
explicit add##argNames##ConstructorToTable \
|
||||
( \
|
||||
const word& lookup = baseType##Type::typeName \
|
||||
const ::Foam::word& lookup = baseType##Type::typeName \
|
||||
) \
|
||||
{ \
|
||||
construct##argNames##ConstructorTables(); \
|
||||
@ -109,7 +113,7 @@ Description
|
||||
{ \
|
||||
public: \
|
||||
\
|
||||
const word name; /* Lookup name for later removal */ \
|
||||
const ::Foam::word name; /* Lookup name for later removal */ \
|
||||
\
|
||||
static autoPtr<baseType> New argList \
|
||||
{ \
|
||||
@ -118,7 +122,7 @@ Description
|
||||
\
|
||||
explicit addRemovable##argNames##ConstructorToTable \
|
||||
( \
|
||||
const word& lookup = baseType##Type::typeName \
|
||||
const ::Foam::word& lookup = baseType##Type::typeName \
|
||||
) \
|
||||
: \
|
||||
name(lookup) \
|
||||
@ -152,8 +156,12 @@ Description
|
||||
typedef autoPtr<baseType> (*argNames##ConstructorPtr)argList; \
|
||||
\
|
||||
/* Construct from argList function table type */ \
|
||||
typedef HashTable<argNames##ConstructorPtr, word> \
|
||||
argNames##ConstructorTable; \
|
||||
typedef HashTable \
|
||||
< \
|
||||
argNames##ConstructorPtr, \
|
||||
::Foam::word, \
|
||||
::Foam::string::hasher \
|
||||
> argNames##ConstructorTable; \
|
||||
\
|
||||
/* Construct from argList function pointer table pointer */ \
|
||||
static argNames##ConstructorTable* argNames##ConstructorTablePtr_; \
|
||||
@ -177,7 +185,7 @@ Description
|
||||
\
|
||||
explicit add##argNames##ConstructorToTable \
|
||||
( \
|
||||
const word& lookup = baseType##Type::typeName \
|
||||
const ::Foam::word& lookup = baseType##Type::typeName \
|
||||
) \
|
||||
{ \
|
||||
construct##argNames##ConstructorTables(); \
|
||||
@ -215,7 +223,7 @@ Description
|
||||
{ \
|
||||
public: \
|
||||
\
|
||||
const word name; /* Lookup name for later removal */ \
|
||||
const ::Foam::word name; /* Lookup name for later removal */ \
|
||||
\
|
||||
static autoPtr<baseType> New##baseType argList \
|
||||
{ \
|
||||
@ -224,7 +232,7 @@ Description
|
||||
\
|
||||
explicit addRemovable##argNames##ConstructorToTable \
|
||||
( \
|
||||
const word& lookup = baseType##Type::typeName \
|
||||
const ::Foam::word& lookup = baseType##Type::typeName \
|
||||
) \
|
||||
: \
|
||||
name(lookup) \
|
||||
|
||||
@ -46,8 +46,12 @@ Description
|
||||
typedef returnType (*memberFunction##argNames##MemberFunctionPtr)argList; \
|
||||
\
|
||||
/* Construct from argList function table type */ \
|
||||
typedef HashTable<memberFunction##argNames##MemberFunctionPtr, word> \
|
||||
memberFunction##argNames##MemberFunctionTable; \
|
||||
typedef HashTable \
|
||||
< \
|
||||
memberFunction##argNames##MemberFunctionPtr, \
|
||||
::Foam::word, \
|
||||
::Foam::string::hasher \
|
||||
> memberFunction##argNames##MemberFunctionTable; \
|
||||
\
|
||||
/* Construct from argList function pointer table pointer */ \
|
||||
static memberFunction##argNames##MemberFunctionTable* \
|
||||
@ -61,7 +65,7 @@ Description
|
||||
\
|
||||
explicit add##memberFunction##argNames##MemberFunctionToTable \
|
||||
( \
|
||||
const word& lookup = baseType##Type::typeName \
|
||||
const ::Foam::word& lookup = baseType##Type::typeName \
|
||||
) \
|
||||
{ \
|
||||
construct##memberFunction##argNames##MemberFunctionTables(); \
|
||||
|
||||
Reference in New Issue
Block a user