1 /* Copyright (c) 2015-2022. 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
15 /** Find a pointer to a value stores in a map (or nullptr) */
16 template<typename C, typename K>
18 typename C::mapped_type* find_map_ptr(C& c, K const& k)
27 template<typename C, typename K>
29 typename C::mapped_type const* find_map_ptr(C const& c, K const& k)
31 typename C::const_iterator i = c.find(k);
39 } // namespace simgrid