]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/include/smpi_datatype.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
In smpi::Group, 'index' is in fact a PID. Fix type and rename.
[simgrid.git] / src / smpi / include / smpi_datatype.hpp
index 294e617381b492ba0c3f3f60df893745a16fbcd1..8b7f9475d95327545c4087cf898c495142576382 100644 (file)
@@ -127,8 +127,7 @@ public:
   Datatype(const Datatype&) = delete;
   Datatype& operator=(const Datatype&) = delete;
   ~Datatype() override;
-
-  const char* name() const { return name_.c_str(); }
+  std::string name() const override {return name_.empty() ? std::string("MPI_Datatype") : name_;}
   size_t size() const { return size_; }
   MPI_Aint lb() const { return lb_; }
   MPI_Aint ub() const { return ub_; }