| 6 | #define BASE_CONTAINERS_UTIL_H_ |
| 7 |
| 8 | #include <stdint.h> |
| 9 |
| 10 | namespace base { |
| 11 |
| 12 | // TODO(crbug.com/817982): What we really need is for checked_math.h to be |
| 13 | // able to do checked arithmetic on pointers. |
| 14 | template <typename T> |
| 15 | static inline uintptr_t get_uintptr(const T* t) { |
| 16 | return reinterpret_cast<uintptr_t>(t); |
| 17 | } |
| 18 |
| 19 | } // namespace base |
| 20 |
| 21 | #endif // BASE_CONTAINERS_UTIL_H_ |
| 22 |