From 22c5698dccd38452540547f19c76288797190751 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 20 Jan 2020 10:31:40 +0100 Subject: [PATCH] changed: use a variadic macro need this to use the macro with templated types having more than parameter --- opm/simulators/utils/ParallelRestart.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index a48281d51..8adfe960c 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -6487,20 +6487,20 @@ INSTANTIATE_PACK_VECTOR(char) INSTANTIATE_PACK_VECTOR(Opm::Tabulated1DFunction) #undef INSTANTIATE_PACK_VECTOR -#define INSTANTIATE_PACK(T) \ -template std::size_t packSize(const T& data, \ +#define INSTANTIATE_PACK(...) \ +template std::size_t packSize(const __VA_ARGS__& data, \ Dune::MPIHelper::MPICommunicator comm); \ -template void pack(const T& data, \ +template void pack(const __VA_ARGS__& data, \ std::vector& buffer, int& position, \ Dune::MPIHelper::MPICommunicator comm); \ -template void unpack(T& data, \ +template void unpack(__VA_ARGS__& data, \ std::vector& buffer, int& position, \ Dune::MPIHelper::MPICommunicator comm); -INSTANTIATE_PACK(double); -INSTANTIATE_PACK(std::size_t); -INSTANTIATE_PACK(bool); -INSTANTIATE_PACK(int); +INSTANTIATE_PACK(double) +INSTANTIATE_PACK(std::size_t) +INSTANTIATE_PACK(bool) +INSTANTIATE_PACK(int) #undef INSTANTIATE_PACK } // end namespace Mpi