From 23fdcd70c6410a8c8f13b16afcf24255c67ad179 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Mon, 16 May 2011 16:20:21 +0000 Subject: [PATCH] Spit 5th bullet __invoke into function pointers and everything else because result_of doesn't deal with function pointers. llvm-svn: 131409 --- libcxx/include/__functional_base | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libcxx/include/__functional_base b/libcxx/include/__functional_base index af9e6238759f..22ac94719a65 100644 --- a/libcxx/include/__functional_base +++ b/libcxx/include/__functional_base @@ -430,6 +430,14 @@ __invoke(_R _T::* __f, _T1&& __t1) // fifth bullet +template +inline _LIBCPP_INLINE_VISIBILITY +_R +__invoke(_R (*__f)(_Param...), _Args&& ...__args) +{ + return __f(_STD::forward<_Args>(__args)...); +} + template inline _LIBCPP_INLINE_VISIBILITY typename result_of<_F(_T...)>::type -- GitLab