4#ifndef TETL_FUNCTIONAL_INVOKE_R_HPP
5#define TETL_FUNCTIONAL_INVOKE_R_HPP
7#include <etl/_functional/invoke.hpp>
8#include <etl/_type_traits/is_invocable_r.hpp>
9#include <etl/_type_traits/is_void.hpp>
10#include <etl/_utility/forward.hpp>
15template <
typename R,
typename F,
typename... Args>
16 requires(
etl::is_invocable_r_v<R, F, Args...>)
17constexpr auto invoke_r(F&& f, Args&&... args) -> R
19 if constexpr (
etl::is_void_v<R>) {
20 etl::invoke(
etl::forward<F>(f),
etl::forward<Args>(args)...);
22 return etl::invoke(
etl::forward<F>(f),
etl::forward<Args>(args)...);
Definition adjacent_find.hpp:9
constexpr auto invoke_r(F &&f, Args &&... args) -> R
Definition invoke_r.hpp:17