}
// for predefined types, so refcount_ = 0.
-Datatype::Datatype(char* name, int ident, int size, MPI_Aint lb, MPI_Aint ub, int flags)
+Datatype::Datatype(const char* name, int ident, int size, MPI_Aint lb, MPI_Aint ub, int flags)
: name_(name), id(std::to_string(ident)), size_(size), lb_(lb), ub_(ub), flags_(flags), refcount_(0)
{
id2type_lookup.insert({id, this});
void Datatype::get_name(char* name, int* length) const
{
- *length = name_.length();
+ *length = static_cast<int>(name_.length());
if (not name_.empty()) {
name_.copy(name, *length);
name[*length] = '\0';