From d624265ef85692f738eb8df18ada4a6b4f8dc299 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 15 Nov 2018 13:04:35 -0600 Subject: [PATCH] Make explicit template instantiation definition a declaration in filter.h --- include/openmc/tallies/filter.h | 2 +- src/tallies/filter.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 {