#include #include struct custom_type { template void serialize(Archive& ar, const unsigned int version) {} }; int main() { boost::mpi::environment env; boost::mpi::communicator comm; if (comm.rank() == 0) { comm.send(1,0,42); comm.send(1,0,custom_type()); } else { { int i; auto req = comm.irecv(0,0,i); req.wait(); std::cout << "Did we receive the built in type message: " << bool(req.test()) << std::endl; } { custom_type c; auto req = comm.irecv(0,0,c); req.wait(); std::cout << "Did we receive the custom type message: " << bool(req.test()) << std::endl; } } return 0; }