11#ifndef CDT_PLUSPLUS_APPLY_MOVE_HPP
12#define CDT_PLUSPLUS_APPLY_MOVE_HPP
14#include <spdlog/spdlog.h>
18#include <tl/function_ref.hpp>
29template <
typename ManifoldType,
30 typename ExpectedType = std::expected<ManifoldType, std::string>,
31 typename FunctionType = tl::function_ref<ExpectedType(ManifoldType&)>>
33 FunctionType t_move)
noexcept ->
decltype(
auto)
35 if (
auto result = std::invoke(t_move, std::forward<ManifoldType>(t_manifold));
43 spdlog::debug(
"apply_move called.\n");
44 spdlog::debug(
"{}", result.error());
auto constexpr apply_move(ManifoldType &&t_manifold, FunctionType t_move) noexcept -> decltype(auto)
An applicative function similar to std::apply on a manifold.