ATLAS Offline Software
Loading...
Searching...
No Matches
CxxUtils::detail::UIntConv< T > Struct Template Reference

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

#include <UIntConv.h>

Collaboration diagram for CxxUtils::detail::UIntConv< T >:

Public Types

using uint_t = typename SizedUInt<sizeof(T)>::type

Static Public Member Functions

static uintptr_t valToUInt (T x)
 Convert a T to a uintptr_t.
static T uintToVal (uintptr_t ui)
 Convert a uintptr_t to a T.

Detailed Description

template<class T>
struct CxxUtils::detail::UIntConv< T >

Helpers for converting between uintptr_t and a pointer or integer.

Definition at line 38 of file UIntConv.h.

Member Typedef Documentation

◆ uint_t

template<class T>
using CxxUtils::detail::UIntConv< T >::uint_t = typename SizedUInt<sizeof(T)>::type

Definition at line 41 of file UIntConv.h.

Member Function Documentation

◆ uintToVal()

template<class T>
T CxxUtils::detail::UIntConv< T >::uintToVal ( uintptr_t ui)
inlinestatic

Convert a uintptr_t to a T.

Definition at line 59 of file UIntConv.h.

59 {
60 const uint_t narrowed = static_cast<uint_t>(ui);
62 };
Helpers for converting between uintptr_t and a pointer or integer.
Definition UIntConv.h:39
typename SizedUInt< sizeof(T)>::type uint_t
Definition UIntConv.h:41

◆ valToUInt()

template<class T>
uintptr_t CxxUtils::detail::UIntConv< T >::valToUInt ( T x)
inlinestatic

Convert a T to a uintptr_t.

Definition at line 50 of file UIntConv.h.

50 {
52 return static_cast<uintptr_t> (ui);
53 };

The documentation for this struct was generated from the following file: