Implement n4169 - Add invoke function template

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@242195 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2015-07-14 20:16:15 +00:00
parent 92679178a5
commit 22dff5382a
3 changed files with 278 additions and 1 deletions

View File

@@ -2447,6 +2447,15 @@ struct _LIBCPP_TYPE_VIS_ONLY hash
};
#endif
#if _LIBCPP_STD_VER > 14
template <class _Fn, class ..._Args>
result_of_t<_Fn&&(_Args&&...)>
invoke(_Fn&& __f, _Args&&... __args) {
return __invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);
}
#endif
// struct hash<T*> in <memory>
_LIBCPP_END_NAMESPACE_STD