Closed dutkalex closed 3 months ago
@dutkalex we require clang-format-8 at present - may be easiest to copy-paste the diff from the failed test and apply it to your branch 😄
TIL std::size_t
is its own implementation-defined type, but std::int8_t
etc are not apparently...
@dutkalex if it's easier than SFINAE for this, I'd accept an implementation that is basically
template <T>
MPI_Datatype mpi_type() {
if constexpr (std::is_same_v<T, char>) {return MPI_CHAR; }
else if constexpr (std::is_same_v<T, int16_t>) { return ...; }
...
}
I think you can just have a branch for each type, and even if two branches are for the same type on certain platforms we won't get any warnings.
@cwpearson Yes, this is actually how I intuitively implemented this in our in house solution, which explains why I did not run into the problem at the time. I will fix this ;)
Anything more we should add before merging this?
Title says it all :)