1 #ifndef VCCC_FUNCTIONAL_BIND_BACK_HPP_
2 #define VCCC_FUNCTIONAL_BIND_BACK_HPP_
17 template<
typename F,
typename... Args>
18 class bind_back_object :
public bind_object_base<bind_back_object<F, Args...>, F, Args...> {
19 using base = bind_object_base<bind_back_object<F, Args...>, F, Args...>;
22 template<
typename Self,
typename... U>
23 struct bind_invoke_result
24 : invoke_result<copy_cvref_t<Self&&, F>, U&&..., copy_cvref_t<Self&&, Args>...> {};
26 template<
typename Self,
typename... U>
27 struct bind_nothrow_invocable
28 : is_nothrow_invocable<copy_cvref_t<Self&&, F>, U&&..., copy_cvref_t<Self&&, Args>...> {};
30 template<std::size_t...I,
typename Self,
typename... U>
31 static constexpr
typename bind_invoke_result<Self&&, U&&...>::type
34 std::forward<Self>(
self).func_,
35 std::forward<U>(args)...,
36 std::get<I>(std::forward<Self>(
self).args_)...
42 using base::operator();
50 template<
typename F,
typename... Args, std::enable_if_t<conjunction<
51 std::is_constructible<std::decay_t<F>, F>,
52 std::is_move_constructible<std::decay_t<F>>,
53 std::is_constructible<std::decay_t<Args>, Args>...,
54 std::is_move_constructible<std::decay_t<Args>>...
57 return detail::bind_back_object<std::decay_t<F>, std::decay_t<Args>...>{
58 detail::bind_object_ctor_tag{},
60 std::forward<Args>(args)...
constexpr invoke_result_t< F, Args... > invoke(F &&f, Args &&... args) noexcept(is_nothrow_invocable< F, Args... >::value)
Definition: invoke.hpp:38
constexpr auto bind_back(F &&f, Args &&... args)
Definition: bind_back.hpp:56
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35