X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/82230d737404aa70c3c2b5824d97109f1f129d58..3078d6318cafa1c1b27ad35fe7c09ad1e1eee001:/include/xbt/utility.hpp diff --git a/include/xbt/utility.hpp b/include/xbt/utility.hpp index e5776312f2..c2315dbbf4 100644 --- a/include/xbt/utility.hpp +++ b/include/xbt/utility.hpp @@ -22,6 +22,13 @@ public: bool operator()(const Pair& a, const Pair& b) const { return a.first > b.first; } }; +/** @brief Erase an element given by reference from a boost::intrusive::list. + */ +template inline void intrusive_erase(List& list, Elem& elem) +{ + list.erase(list.iterator_to(elem)); +} + // integer_sequence and friends from C++14 // We need them to implement `apply` from C++17.