From f0cccbe3285c039553e1fd8b5a5c7830d6087974 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Thu, 6 Mar 2025 22:56:56 +0100 Subject: Replace ASL_MOVE, ASL_FWD, and ASL_FWD_LIKE by their std:: equivalent This is because some compiler stuff and diagnostics tools rely on those symboles being what they are. --- asl/base/functional.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'asl/base/functional.hpp') diff --git a/asl/base/functional.hpp b/asl/base/functional.hpp index 9aeb485..509a2b2 100644 --- a/asl/base/functional.hpp +++ b/asl/base/functional.hpp @@ -11,22 +11,22 @@ namespace asl { template constexpr auto invoke(is_func auto C::* f, auto&& self, Args&&... args) - -> decltype((self.*f)(ASL_FWD(args)...)) + -> decltype((self.*f)(std::forward(args)...)) requires requires { - (self.*f)(ASL_FWD(args)...); + (self.*f)(std::forward(args)...); } { - return (ASL_FWD(self).*f)(ASL_FWD(args)...); + return (std::forward(self).*f)(std::forward(args)...); } template constexpr auto invoke(is_func auto C::* f, auto* self, Args&&... args) - -> decltype((self->*f)(ASL_FWD(args)...)) + -> decltype((self->*f)(std::forward(args)...)) requires requires { - (self->*f)(ASL_FWD(args)...); + (self->*f)(std::forward(args)...); } { - return (self->*f)(ASL_FWD(args)...); + return (self->*f)(std::forward(args)...); } template @@ -37,7 +37,7 @@ constexpr auto invoke(is_object auto C::* m, auto&& self, Args&&...) requires { self.*m; } ) { - return ASL_FWD(self).*m; + return std::forward(self).*m; } template @@ -53,12 +53,12 @@ constexpr auto invoke(is_object auto C::* m, auto* self, Args&&...) template constexpr auto invoke(auto&& f, Args&&... args) - -> decltype(f(ASL_FWD(args)...)) + -> decltype(f(std::forward(args)...)) requires requires { - f(ASL_FWD(args)...); + f(std::forward(args)...); } { - return ASL_FWD(f)(ASL_FWD(args)...); + return std::forward(f)(std::forward(args)...); } template @@ -76,7 +76,7 @@ using invoke_result_t = _invoke_result_helper::type; template concept invocable = requires (F&& f, Args&&... args) { - invoke(ASL_FWD(f), ASL_FWD(args)...); + invoke(std::forward(f), std::forward(args)...); }; } // namespace asl -- cgit