31#ifndef FENNEC_LANG_UTILITY_H
32#define FENNEC_LANG_UTILITY_H
76 return static_cast<T&&
>(x);
80template<
typename T>
constexpr T&& forward(remove_reference_t<T>&& x)
noexcept {
81 return static_cast<T&&
>(x);
113template<
typename T>
requires is_fundamental_v<T>
114constexpr void swap(T& x, T& y)
noexcept {
125template<
typename T>
constexpr void swap(T& x, T& y)
noexcept {
126#if FENNEC_COMPILER_GCC
127#pragma GCC diagnostic push
128#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
135#if FENNEC_COMPILER_GCC
136#pragma GCC diagnostic pop
constexpr genType y()
Definition constants.h:672
constexpr T && forward(remove_reference_t< T > &x) noexcept
forwards reference types to extend their lifetime
Definition utility.h:75
constexpr const remove_reference_t< T > & copy(T &&x) noexcept
produces an r-value type to indicate x may be "copied"
Definition utility.h:104
constexpr void swap(T &x, T &y) noexcept
Swaps x and y.
Definition utility.h:114
constexpr remove_reference_t< T > && move(T &&x) noexcept
produces an x-value type to indicate x may be "moved"
Definition utility.h:92