-#ifndef _XBT_DYNAR_H
-#define _XBT_DYNAR_H
-
-#include "xbt/misc.h" /* BEGIN_DECL */
-
-BEGIN_DECL()
-
-/** \addtogroup XBT_dynar
- *
- * For performance concerns, the content of DynArr must be homogeneous (in
- * contrary to dictionnaries -- see the \ref XBT_dict section). You thus
- * have to provide the function which will be used to free the content at
- * structure creation (of type void_f_ppvoid_t or void_f_pvoid_t).
- *
- * \section XBT_dynar_exscal Example with scalar
- * \dontinclude dynar_int.c
- *
- * \skip Vars_decl
- * \skip dyn
- * \until iptr
- * \skip Populate_ints
- * \skip dyn
- * \until end_of_traversal
- * \skip shifting
- * \skip val
- * \until xbt_dynar_free
- *
- * \section XBT_dynar_exptr Example with pointed data
- * \dontinclude dynar_string.c
- *
- * \skip doxygen_first_cruft
- * \skip f
- * \until xbt_init
- * \skip Populate_str
- * \skip dyn
- * \until }
- * \skip macro
- * \until dynar_free
- * \skip xbt_exit
- * \until }
- * @{
- */
-
-/** @name 1. Constructor/destructor
+#ifndef XBT_DYNAR_H
+#define XBT_DYNAR_H
+
+#include <string.h> /* memcpy */
+
+#include <xbt/base.h> /* SG_BEGIN_DECL */
+#include <xbt/function_types.h>
+
+SG_BEGIN_DECL
+
+/** @addtogroup XBT_dynar
+ * @brief DynArr are dynamically sized vector which may contain any type of variables.
+ *
+ * These are the SimGrid version of the dynamically size arrays, which all C programmer recode one day or another.
+ *
+ * For performance concerns, the content of DynArr must be homogeneous (in contrary to dictionaries -- see the
+ * @ref XBT_dict section). You thus have to provide the function which will be used to free the content at
+ * structure creation (of type void_f_pvoid_t).
+ *
+ * @deprecated If you are using C++, you might want to use `std::vector` instead.
+ *
+ * @section XBT_dynar_exscal Example with scalar
+ * @dontinclude dynar.cpp
+ *
+ * @skip Vars_decl
+ * @skip dyn
+ * @until iptr
+ * @skip Populate_ints
+ * @skip dyn
+ * @until end_of_traversal
+ * @skip shifting
+ * @skip val
+ * @until xbt_dynar_free
+ *
+ * @section XBT_dynar_exptr Example with pointed data
+ *
+ * @skip test_dynar_string
+ * @skip dynar_t
+ * @until s2
+ * @skip Populate_str
+ * @skip dyn
+ * @until }
+ * @skip macro
+ * @until dynar_free
+ * @skip end_of_doxygen
+ * @until }
+ *
+ * Note that if you use dynars to store pointed data, the xbt_dynar_search(), xbt_dynar_search_or_negative() and
+ * xbt_dynar_member() won't be for you. Instead of comparing your pointed elements, they compare the pointer to them.
+ * See the documentation of xbt_dynar_search() for more info.
+ */
+/** @defgroup XBT_dynar_cons Dynar constructor and destructor
+ * @ingroup XBT_dynar
+ *