Go to the documentation of this file.
4 #ifndef LEXY_DETAIL_INVOKE_HPP_INCLUDED
5 #define LEXY_DETAIL_INVOKE_HPP_INCLUDED
11 template <
typename MemberPtr,
bool = std::is_member_
object_po
inter_v<MemberPtr>>
13 template <
typename R,
typename ClassT>
16 static constexpr decltype(
auto)
invoke(R ClassT::*
f, ClassT&
object)
20 static constexpr decltype(
auto)
invoke(R ClassT::*
f, const ClassT&
object)
25 template <
typename Ptr>
31 template <
typename F,
typename ClassT>
34 template <
typename ObjectT,
typename... Args>
35 static constexpr
auto _invoke(
int, F ClassT::*
f, ObjectT&&
object, Args&&... args)
40 template <
typename PtrT,
typename... Args>
41 static constexpr
auto _invoke(
short, F ClassT::*
f, PtrT&& ptr, Args&&... args)
47 template <
typename... Args>
48 static constexpr
auto invoke(F ClassT::*
f, Args&&... args)
49 -> decltype(_invoke(0,
f,
LEXY_FWD(args)...))
55 template <
typename ClassT,
typename F,
typename... Args>
56 constexpr
auto invoke(F ClassT::*
f, Args&&... args)
62 template <
typename F,
typename... Args>
69 #endif // LEXY_DETAIL_INVOKE_HPP_INCLUDED
static constexpr auto _invoke(int, F ClassT::*f, ObjectT &&object, Args &&... args) -> decltype((LEXY_FWD(object).*f)(LEXY_FWD(args)...))
static constexpr auto _invoke(short, F ClassT::*f, PtrT &&ptr, Args &&... args) -> decltype(((*LEXY_FWD(ptr)).*f)(LEXY_FWD(args)...))
static constexpr auto invoke(R ClassT::*f, Ptr &&ptr) -> decltype((*LEXY_FWD(ptr)).*f)
constexpr auto invoke(F &&f, Args &&... args) -> decltype(LEXY_FWD(f)(LEXY_FWD(args)...))
constexpr auto invoke(F ClassT::*f, Args &&... args) -> decltype(_mem_invoker< F ClassT::* >::invoke(f, LEXY_FWD(args)...))
static constexpr auto invoke(F ClassT::*f, Args &&... args) -> decltype(_invoke(0, f, LEXY_FWD(args)...))