nngn
Loading...
Searching...
No Matches
literals.h
Go to the documentation of this file.
1#ifndef NNGN_UTILS_LITERALS_H
2#define NNGN_UTILS_LITERALS_H
3
4#include <cstddef>
5#include <cstdint>
6
8
9namespace nngn::literals {
10
11inline constexpr auto operator ""_uc(unsigned long long int i) {
12 return static_cast<unsigned char>(i);
13}
14
15inline constexpr auto operator ""_u8(unsigned long long int i) {
16 return static_cast<std::uint8_t>(i);
17}
18
19inline constexpr auto operator ""_u16(unsigned long long int i) {
20 return static_cast<std::uint16_t>(i);
21}
22
23inline constexpr auto operator ""_u32(unsigned long long int i) {
24 return static_cast<std::uint32_t>(i);
25}
26
27inline constexpr auto operator ""_z(unsigned long long int i) {
28 return static_cast<std::size_t>(i);
29}
30
31inline constexpr auto operator ""_t(unsigned long long int i) {
32 return static_cast<std::ptrdiff_t>(i);
33}
34
35template<nngn::fixed_string s>
36inline constexpr auto operator ""_s(void) {
37 return s;
38}
39
40}
41
42#endif
for i
Definition font.lua:5
Definition literals.h:9
std::chrono::seconds s
Definition timing.cpp:6