dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
Literals.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Vincent Leroy
2// SPDX-License-Identifier: MIT
3//
4// This file is part of dfx.
5//
6// Licensed under the MIT License. See the LICENSE file in the project root
7// for full license information.
8
9#pragma once
10
11// Standard includes
12#include <cstdint>
13
42
53{
59 constexpr int8_t operator ""_i8(unsigned long long int val) noexcept
60 { return static_cast<int8_t>(val); }
61
67 constexpr int16_t operator ""_i16(unsigned long long int val) noexcept
68 { return static_cast<int16_t>(val); }
69
75 constexpr int32_t operator ""_i32(unsigned long long int val) noexcept
76 { return static_cast<int32_t>(val); }
77
83 constexpr int64_t operator ""_i64(unsigned long long int val) noexcept
84 { return static_cast<int64_t>(val); }
85
89 constexpr uint8_t operator ""_u8(unsigned long long int val) noexcept
90 { return static_cast<uint8_t>(val); }
91
95 constexpr uint16_t operator ""_u16(unsigned long long int val) noexcept
96 { return static_cast<uint16_t>(val); }
97
101 constexpr uint32_t operator ""_u32(unsigned long long int val) noexcept
102 { return static_cast<uint32_t>(val); }
103
110 constexpr uint64_t operator ""_u64(unsigned long long int val) noexcept
111 { return val; }
112} // namespace dfx::Utils::literals
Namespace containing fixed-width integer literal operators.