summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2011-05-16 16:20:21 +0000
committerHoward Hinnant <hhinnant@apple.com>2011-05-16 16:20:21 +0000
commit23fdcd70c6410a8c8f13b16afcf24255c67ad179 (patch)
tree2655b8af69d390e853cd2507c106069834b5c88d /libcxx
parent07de7bcaa0051efa1734a89031b804056c05a752 (diff)
downloadbcm5719-llvm-23fdcd70c6410a8c8f13b16afcf24255c67ad179.tar.gz
bcm5719-llvm-23fdcd70c6410a8c8f13b16afcf24255c67ad179.zip
Spit 5th bullet __invoke into function pointers and everything else because result_of doesn't deal with function pointers.
llvm-svn: 131409
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/__functional_base8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/include/__functional_base b/libcxx/include/__functional_base
index af9e6238759..22ac94719a6 100644
--- a/libcxx/include/__functional_base
+++ b/libcxx/include/__functional_base
@@ -430,6 +430,14 @@ __invoke(_R _T::* __f, _T1&& __t1)
// fifth bullet
+template <class _R, class ..._Param, class ..._Args>
+inline _LIBCPP_INLINE_VISIBILITY
+_R
+__invoke(_R (*__f)(_Param...), _Args&& ...__args)
+{
+ return __f(_STD::forward<_Args>(__args)...);
+}
+
template <class _F, class ..._T>
inline _LIBCPP_INLINE_VISIBILITY
typename result_of<_F(_T...)>::type
OpenPOWER on IntegriCloud