/* * Copyright 2015 - 2025 gary@drinkingtea.net * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #pragma once #if __has_include() #include #include "typetraits.hpp" #else #include "typetraits.hpp" namespace std { template constexpr ox::remove_reference_t &&move(T &&t) noexcept { return static_cast&&>(t); } template constexpr void swap(T &a, T &b) noexcept { auto temp = std::move(a); a = std::move(b); b = std::move(temp); } } #endif namespace ox { struct in_place_t { explicit constexpr in_place_t() = default; }; inline constexpr ox::in_place_t in_place; template constexpr T &&forward(remove_reference_t &t) noexcept { return static_cast(t); } template constexpr T &&forward(remove_reference_t &&t) noexcept { return static_cast(t); } }