2 * Copyright (c) 2023 Philippe Proulx <pproulx@efficios.com>
4 * SPDX-License-Identifier: MIT
7 #ifndef BABELTRACE_CPP_COMMON_BT2C_CALL_HPP
8 #define BABELTRACE_CPP_COMMON_BT2C_CALL_HPP
16 * Partial implementation of INVOKE.
19 * <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0312r1.html>.
21 template <typename FuncT, typename... ArgTs>
22 auto call(FuncT func, ArgTs&&...args) -> decltype(std::ref(func)(std::forward<ArgTs>(args)...))
24 return std::ref(func)(std::forward<ArgTs>(args)...);
27 } /* namespace bt2c */
29 #endif /* BABELTRACE_CPP_COMMON_BT2C_CALL_HPP */