diff --git a/include/openmc/tallies/filter.h b/include/openmc/tallies/filter.h index 5590a07674..fd3be0aafe 100644 --- a/include/openmc/tallies/filter.h +++ b/include/openmc/tallies/filter.h @@ -29,7 +29,7 @@ public: // Without an explicit instantiation of vector, the Intel compiler // will complain about the threadprivate directive on filter_matches. Note that // this has to happen *outside* of the openmc namespace -template class std::vector; +extern template class std::vector; namespace openmc { diff --git a/src/tallies/filter.cpp b/src/tallies/filter.cpp index aa5d196072..7cf54165d9 100644 --- a/src/tallies/filter.cpp +++ b/src/tallies/filter.cpp @@ -26,6 +26,8 @@ #include "openmc/tallies/filter_universe.h" #include "openmc/tallies/filter_zernike.h" +// explicit template instantiation definition +template class std::vector; namespace openmc {