ATLAS Offline Software
SizedUInt.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration.
4  */
15 #ifndef CXXUTILS_SIZEDUINT_H
16 #define CXXUTILS_SIZEDUINT_H
17 
18 
19 #include <cstdint>
20 
21 
22 namespace CxxUtils {
23 namespace detail {
24 
25 
26 template <unsigned SIZE>
27 struct SizedUInt
28 {
29 };
30 
31 
32 template <>
33 struct SizedUInt<1>
34 {
35  using type = uint8_t;
36 };
37 
38 
39 template <>
40 struct SizedUInt<2>
41 {
42  using type = uint16_t;
43 };
44 
45 
46 template <>
47 struct SizedUInt<4>
48 {
49  using type = uint32_t;
50 };
51 
52 
53 template <>
54 struct SizedUInt<8>
55 {
56  using type = uint64_t;
57 };
58 
59 
60 } // namespace detail
61 } // namespace CxxUtils
62 
63 
64 #endif // not CXXUTILS_SIZEDUINT_H
CxxUtils::detail::SizedUInt< 2 >::type
uint16_t type
Definition: SizedUInt.h:42
CxxUtils::detail::SizedUInt
Definition: SizedUInt.h:28
CxxUtils::detail::SizedUInt< 8 >::type
uint64_t type
Definition: SizedUInt.h:56
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
detail
Definition: extract_histogram_tag.cxx:14
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
CxxUtils
Definition: aligned_vector.h:29
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
CxxUtils::detail::SizedUInt< 1 >::type
uint8_t type
Definition: SizedUInt.h:35
CxxUtils::detail::SizedUInt< 4 >::type
uint32_t type
Definition: SizedUInt.h:49