Lely core libraries
2.3.4
functional.hpp
Go to the documentation of this file.
1
22
#ifndef LELY_LIBC_FUNCTIONAL_HPP_
23
#define LELY_LIBC_FUNCTIONAL_HPP_
24
25
#include <
lely/features.h
>
26
#if __cplusplus <= 201703L
27
#include <
lely/libc/type_traits.hpp
>
28
#endif
29
30
#include <functional>
31
#include <utility>
32
33
namespace
lely {
34
namespace
compat {
35
36
#if __cplusplus >= 201703L
37
38
using ::std::invoke;
39
40
#else // __cplusplus < 201703L
41
46
template
<
class
F,
class
... Args>
47
inline
invoke_result_t<F, Args...>
48
invoke
(F&& f, Args&&... args) {
49
return
detail::invoke(::std::forward<F>(f), ::std::forward<Args>(args)...);
50
}
51
52
#endif // __cplusplus < 201703L
53
54
}
// namespace compat
55
}
// namespace lely
56
57
#endif // !LELY_LIBC_FUNCTIONAL_HPP_
features.h
type_traits.hpp
lely::compat::invoke
invoke_result_t< F, Args... > invoke(F &&f, Args &&... args)
Invokes f with the arguments args... as if by INVOKE(forward<F>(f), forward<Args>(args)....
Definition:
functional.hpp:48
include
lely
libc
functional.hpp
Generated by
1.8.17