X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/77bbf3027c4240a2e833209a3a3f186589da8577..255192ad7c234ae1f6631d080b0d2d9cfc60ec1b:/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.