3#ifndef TETL_FUNCTIONAL_BIND_FRONT_HPP
4#define TETL_FUNCTIONAL_BIND_FRONT_HPP
20template <
typename Func,
typename BoundArgsTuple,
typename... CallArgs>
21constexpr auto bind_front_caller(Func&& func, BoundArgsTuple&& boundArgsTuple, CallArgs&&... callArgs) ->
decltype(
auto)
23 return etl::apply([&func, &callArgs...]<
typename... BoundArgs>(BoundArgs&&... boundArgs) ->
decltype(
auto) {
25 etl::forward<Func>(func),
26 etl::forward<BoundArgs>(boundArgs)...,
27 etl::forward<CallArgs>(callArgs)...
32template <
typename Func,
typename... BoundArgs>
35 template <
typename F,
typename... BA>
37 explicit bind_front_t(F&& f, BA&&... ba)
39 , _boundArgs(etl::
forward<BA>(ba)...)
44 template <
typename... CallArgs>
45 auto operator()(CallArgs&&... callArgs) & -> invoke_result_t<Func&, BoundArgs&..., CallArgs...>
51 template <
typename... CallArgs>
52 auto operator()(CallArgs&&... callArgs)
const& -> invoke_result_t<Func
const&, BoundArgs
const&..., CallArgs...>
58 template <
typename... CallArgs>
59 auto operator()(CallArgs&&... callArgs) && -> invoke_result_t<Func, BoundArgs..., CallArgs...>
65 template <
typename... CallArgs>
66 auto operator()(CallArgs&&... callArgs)
const&& -> invoke_result_t<Func
const, BoundArgs
const..., CallArgs...>
73 tuple<BoundArgs...> _boundArgs;
86template <
typename Func,
typename... BoundArgs>
87constexpr auto bind_front(Func&& func, BoundArgs&&... boundArgs)
constexpr auto move(InputIt first, InputIt last, OutputIt destination) -> OutputIt
Moves the elements in the range [first, last), to another range beginning at destination,...
Definition move.hpp:26
Definition adjacent_find.hpp:8
constexpr bool is_base_of_v
Definition is_base_of.hpp:39
constexpr auto apply(F &&f, Tuple &&t) -> decltype(auto)
Definition apply.hpp:16
constexpr auto bind_front(Func &&func, BoundArgs &&... boundArgs)
The function template bind_front generates a forwarding call wrapper for f. Calling this wrapper is e...
Definition bind_front.hpp:87
typename unwrap_ref_decay< T >::type unwrap_ref_decay_t
Definition unwrap_reference.hpp:27
constexpr auto forward(remove_reference_t< T > ¶m) noexcept -> T &&
Forwards lvalues as either lvalues or as rvalues, depending on T. When t is a forwarding reference (a...
Definition forward.hpp:18