ATLAS Offline Software
Loading...
Searching...
No Matches
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 */
13
14
15#ifndef CXXUTILS_SIZEDUINT_H
16#define CXXUTILS_SIZEDUINT_H
17
18
19#include <cstdint>
20
21
22namespace CxxUtils {
23namespace detail {
24
25
26template <unsigned SIZE>
28{
29};
30
31
32template <>
33struct SizedUInt<1>
34{
35 using type = uint8_t;
36};
37
38
39template <>
40struct SizedUInt<2>
41{
42 using type = uint16_t;
43};
44
45
46template <>
47struct SizedUInt<4>
48{
49 using type = uint32_t;
50};
51
52
53template <>
54struct 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