A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Remove deprecated features for the new next release (3.34)" until after the...
[simgrid.git]
/
include
/
xbt
/
Extendable.hpp
diff --git
a/include/xbt/Extendable.hpp
b/include/xbt/Extendable.hpp
index
e315219
..
8dbc3ab
100644
(file)
--- a/
include/xbt/Extendable.hpp
+++ b/
include/xbt/Extendable.hpp
@@
-11,6
+11,7
@@
#include <cstddef>
#include <functional>
#include <limits>
#include <cstddef>
#include <functional>
#include <limits>
+#include <memory>
#include <vector>
namespace simgrid::xbt {
#include <vector>
namespace simgrid::xbt {
@@
-109,6
+110,8
@@
public:
extensions_[0]=data;
}
template <typename D> D* get_data() const { return static_cast<D*>(extensions_[0]); }
extensions_[0]=data;
}
template <typename D> D* get_data() const { return static_cast<D*>(extensions_[0]); }
+ template <typename D> std::unique_ptr<D> get_unique_data() { return std::unique_ptr<D>(get_data<D>()); }
+
XBT_ATTRIB_DEPRECATED_v334("Please use typed template Extendable::get_data<>()") void* get_data() const
{
return get_data<void>();
XBT_ATTRIB_DEPRECATED_v334("Please use typed template Extendable::get_data<>()") void* get_data() const
{
return get_data<void>();