Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Typed template for Extendable::get_data.
[simgrid.git] / examples / cpp / io-file-system / s4u-io-file-system.cpp
index bc745d1..3dc82a0 100644 (file)
@@ -57,7 +57,7 @@ public:
 
     // Test attaching some user data to the file
     file->set_data(new std::string("777"));
-    const auto* file_data = static_cast<std::string*>(file->get_data());
+    const auto* file_data = file->get_data<std::string>();
     XBT_INFO("User data attached to the file: %s", file_data->c_str());
     delete file_data;