CDT++ 1.0.0
Causal Dynamical Triangulations in C++
Loading...
Searching...
No Matches
Apply_move.hpp
Go to the documentation of this file.
1/*******************************************************************************
2 Causal Dynamical Triangulations in C++ using CGAL
3
4 Copyright © 2019 Adam Getchell
5 ******************************************************************************/
6
10
11#ifndef CDT_PLUSPLUS_APPLY_MOVE_HPP
12#define CDT_PLUSPLUS_APPLY_MOVE_HPP
13
14#include <functional>
15#include <utility>
16
17namespace cdt
18{
28 template <typename ManifoldType, typename FunctionType, typename... Arguments>
29 [[nodiscard]] constexpr auto apply_move(ManifoldType const& t_manifold,
30 FunctionType t_move,
31 Arguments&&... arguments)
32 -> decltype(auto)
33 {
34 return std::invoke(t_move, t_manifold,
35 std::forward<Arguments>(arguments)...);
36 }
37} // namespace cdt
38
39#endif // CDT_PLUSPLUS_APPLY_MOVE_HPP
clang-15 does not support std::format
constexpr auto apply_move(ManifoldType const &t_manifold, FunctionType t_move, Arguments &&... arguments) -> decltype(auto)
An applicative function similar to std::apply on a manifold.