HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
required.hpp File Reference

This file includes required definitions. More...

#include <cstddef>
#include <string>
#include <chrono>

Go to the source code of this file.

Macros

#define hilet   auto const
 Invariant should be the default for variables.
 
#define hi_forward(x)   std::forward<decltype(x)>(x)
 Forward a value, based on the decltype of the value.
 
#define ssizeof(x)   (static_cast<ssize_t>(sizeof(x)))
 
#define hi_return_on_self_assignment(other)
 

Typedefs

using v1::ssize_t = std::ptrdiff_t
 Signed size/index into an array.
 

Functions

constexpr std::size_t v1::operator""_uz (unsigned long long lhs) noexcept
 
constexpr std::size_t v1::operator""_zu (unsigned long long lhs) noexcept
 
constexpr std::ptrdiff_t v1::operator""_z (unsigned long long lhs) noexcept
 

Detailed Description

This file includes required definitions.

Macro Definition Documentation

◆ hi_forward

#define hi_forward ( x)    std::forward<decltype(x)>(x)

Forward a value, based on the decltype of the value.

◆ hi_return_on_self_assignment

#define hi_return_on_self_assignment ( other)
Value:
if (&(other) == this) [[unlikely]] \
return *this;

◆ hilet

#define hilet   auto const

Invariant should be the default for variables.

C++ does have an invariant but it requires you to enter the 'const' keyword which is easy to forget. Using a single keyword 'hilet' for an invariant makes it easier to notice when you have defined a variant.

Typedef Documentation

◆ ssize_t

Signed size/index into an array.