1 /* Copyright (c) 2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef SIMGRID_UTIL_HTPP
8 #define SIMGRID_UTIL_HTPP
17 /** Find a pointer to a value stores in a map (or nullptr) */
18 template<typename C, typename K>
20 typename C::mapped_type* find_map_ptr(C& c, K const& k)
22 typename C::iterator i = c.find(k);
29 template<typename C, typename K>
31 typename C::mapped_type const* find_map_ptr(C const& c, K const& k)
33 typename C::const_iterator i = c.find(k);