error compiling with clang
Clang (Apple LLVM version 9.0.0 (clang-900.0.38)) complains about several expressions in the OPAL code. One I do not know how to fix is:
[ 11%] Building CXX object src/CMakeFiles/OPALib.dir/Editor/EditParser.cpp.o
In file included from /Users/gsell/src/OPAL/src/src/Classic/Parser/ClassicParser.cpp:39:
In file included from /Users/gsell/src/OPAL/src/src/Classic/BeamlineCore/Octupole.h:23:
/Users/gsell/src/OPAL/src/src/Classic/BeamlineCore/SingleMultipole.h:209:30: error: instantiation of variable
'SingleMultipole<4>::entries' required here, but no definition is available [-Werror,-Wundefined-var-template]
for(const Entry *entry = entries; entry->name != 0; ++entry) {
^
/Users/gsell/src/OPAL/src/src/Classic/BeamlineCore/SingleMultipole.h:60:14: note: in instantiation of member function
'SingleMultipole<4>::getChannel' requested here
explicit SingleMultipole(const std::string &name);
^
/Users/gsell/src/OPAL/src/src/Classic/Parser/ClassicParser.cpp:111:24: note: in instantiation of member function
'SingleMultipole<4>::SingleMultipole' requested here
factory.define(new Octupole("OCTUPOLE"));
^
/Users/gsell/src/OPAL/src/src/Classic/BeamlineCore/SingleMultipole.h:130:24: note: forward declaration of template entity is here
static const Entry entries[];
^
/Users/gsell/src/OPAL/src/src/Classic/BeamlineCore/SingleMultipole.h:209:30: note: add an explicit instantiation declaration to suppress
this warning if 'SingleMultipole<4>::entries' is explicitly instantiated in another translation unit
for(const Entry *entry = entries; entry->name != 0; ++entry) {
^
1 error generated.
What is the right "explicit instantiation declaration" here???