changed: use a variadic macro

need this to use the macro with templated types having
more than parameter
This commit is contained in:
Arne Morten Kvarving 2020-01-20 10:31:40 +01:00
parent a0af703c26
commit 22c5698dcc

View File

@ -6487,20 +6487,20 @@ INSTANTIATE_PACK_VECTOR(char)
INSTANTIATE_PACK_VECTOR(Opm::Tabulated1DFunction<double>) INSTANTIATE_PACK_VECTOR(Opm::Tabulated1DFunction<double>)
#undef INSTANTIATE_PACK_VECTOR #undef INSTANTIATE_PACK_VECTOR
#define INSTANTIATE_PACK(T) \ #define INSTANTIATE_PACK(...) \
template std::size_t packSize(const T& data, \ template std::size_t packSize(const __VA_ARGS__& data, \
Dune::MPIHelper::MPICommunicator comm); \ Dune::MPIHelper::MPICommunicator comm); \
template void pack(const T& data, \ template void pack(const __VA_ARGS__& data, \
std::vector<char>& buffer, int& position, \ std::vector<char>& buffer, int& position, \
Dune::MPIHelper::MPICommunicator comm); \ Dune::MPIHelper::MPICommunicator comm); \
template void unpack(T& data, \ template void unpack(__VA_ARGS__& data, \
std::vector<char>& buffer, int& position, \ std::vector<char>& buffer, int& position, \
Dune::MPIHelper::MPICommunicator comm); Dune::MPIHelper::MPICommunicator comm);
INSTANTIATE_PACK(double); INSTANTIATE_PACK(double)
INSTANTIATE_PACK(std::size_t); INSTANTIATE_PACK(std::size_t)
INSTANTIATE_PACK(bool); INSTANTIATE_PACK(bool)
INSTANTIATE_PACK(int); INSTANTIATE_PACK(int)
#undef INSTANTIATE_PACK #undef INSTANTIATE_PACK
} // end namespace Mpi } // end namespace Mpi