Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
unique_ptr for dynar, automaton, swag, etc.
[simgrid.git] / include / xbt / dynar.h
index 6dcebc9..8aa9d0d 100644 (file)
@@ -256,6 +256,17 @@ xbt_dynar_foreach (dyn,cpt,str) {
             (_cursor)++         )
 #endif
 /** @} */
-
 SG_END_DECL()
+
+#ifdef __cplusplus
+namespace simgrid {
+namespace xbt {
+  inline void destroy(xbt_dynar_t s)
+  {
+    xbt_dynar_free(&s);
+  }
+}
+}
+#endif
+
 #endif                          /* _XBT_DYNAR_H */