15 MPI_Datatype datatype{};
17 using _type = std::remove_const_t<std::remove_reference_t<T>>;
19 if constexpr (std::is_same_v<_type, size_t>)
21 datatype = MPI_UNSIGNED_LONG;
23 else if constexpr (std::is_same_v<_type, double>)
25 datatype = MPI_DOUBLE;
27 else if constexpr (std::is_same_v<_type, int>)
31 else if constexpr (std::is_same_v<_type, bool>)
33 datatype = MPI_CXX_BOOL;
35 else if constexpr (std::is_same_v<_type, char>
36 || std::is_same_v<_type, WrapMPI::SIGNALS>)
42 []<
bool flag =
false>() {
static_assert(flag,
"no match"); }();