From 6bcc0bea59e639e20bd3244b5c2b6c001aa2a707 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 9 Apr 2024 15:45:05 +0200 Subject: b --- compat/move.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compat/move.hpp b/compat/move.hpp index 483de82b..ca17aa72 100644 --- a/compat/move.hpp +++ b/compat/move.hpp @@ -1,5 +1,6 @@ #pragma once #include +#include namespace floormat { @@ -8,26 +9,26 @@ template concept AlwaysTrue = true; // from Corrade/Utility/Move.h template -constexpr T&& forward(std::remove_reference_t& t) noexcept +constexpr CORRADE_ALWAYS_INLINE T&& forward(std::remove_reference_t& t) noexcept { return static_cast(t); } template -constexpr T&& forward(std::remove_reference_t&& t) noexcept +constexpr CORRADE_ALWAYS_INLINE T&& forward(std::remove_reference_t&& t) noexcept { static_assert(!std::is_lvalue_reference_v); return static_cast(t); } template -constexpr std::remove_reference_t&& move(T&& t) noexcept +constexpr CORRADE_ALWAYS_INLINE std::remove_reference_t&& move(T&& t) noexcept { return static_cast&&>(t); } template -void swap(T& a, std::common_type_t& b) +constexpr inline void swap(T& a, std::common_type_t& b) noexcept(std::is_nothrow_move_constructible_v && std::is_nothrow_move_assignable_v) { T tmp = static_cast(a); -- cgit v1.2.3