Comm& Comm::Clone() const = 0
Intracomm& Intracomm::Clone() const
Intercomm& Intercomm::Clone() const
Cartcomm& Cartcomm::Clone() const
Graphcomm& Graphcomm::Clone() const
namespace MPI { class Comm { virtual Comm& Clone() const = 0; }; class Intracomm : public Comm { Intracomm Dup() const { ... }; virtual Intracomm& Clone() const { ... }; }; class Intercomm : public Comm { Intercomm Dup() const { ... }; virtual Intercomm& Clone() const { ... }; }; // Cartcomm and Graphcomm are similarly defined };Compilers that do not support the variable return type feature of virtual functions may return a reference to Comm. Users can cast to the appropriate type as necessary.(End of advice to implementors.)
MPI-Standard for MARMOT