mgerhold / silly-sprites

MIT License
4 stars 0 forks source link

add header for type aliases (like `usize`) #37

Closed mgerhold closed 1 year ago

kgnet88 commented 1 year ago

In addition to type aliases, you should also add some user defined literals. So, if you have the following usings for example:

using U32 = std::uint32_t;
using I32 = std::int32_t;
...
using USize = std::size_t;

you would have the following literals:

namespace literals
{
std::uint32_t operator""_u32(unsigned long long value);
std::int32_t operator""_i32(unsigned long long value);
...
std::size_t operator""_uz(unsigned long long value);
} 

It gives a nice symmetry 🐻