ATLAS Offline Software
Classes | Namespaces
UIntConv.h File Reference

Helpers for converting between uintptr_t and a pointer or integer. More...

#include "CxxUtils/SizedUInt.h"
#include <cstdint>
Include dependency graph for UIntConv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  CxxUtils::detail::UIntConv< T >
 Helpers for converting between uintptr_t and a pointer or integer. More...
 
union  CxxUtils::detail::UIntConv< uintptr_t >
 

Namespaces

 CxxUtils
 
 CxxUtils::detail
 Portable implementations.
 

Detailed Description

Helpers for converting between uintptr_t and a pointer or integer.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Jan, 2023 The concurrent hashmap classes internally represent entries as a uintptr_t. But the user-facing classes get templated on types that could be any POD-like type that can fit in that size. To convert from a uintptr_t to such a type T, we need to first convert to a properly-sized unsigned type using static_cast, and then use a union to convert to T.

Definition in file UIntConv.h.