diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-05-16 16:20:21 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-05-16 16:20:21 +0000 |
commit | 23fdcd70c6410a8c8f13b16afcf24255c67ad179 (patch) | |
tree | 2655b8af69d390e853cd2507c106069834b5c88d /libcxx | |
parent | 07de7bcaa0051efa1734a89031b804056c05a752 (diff) | |
download | bcm5719-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_base | 8 |
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 |