[cfe-commits] [libcxx] r115461 - /libcxx/trunk/include/__functional_base_03
Howard Hinnant
hhinnant at apple.com
Sun Oct 3 06:59:56 PDT 2010
Author: hhinnant
Date: Sun Oct 3 08:59:56 2010
New Revision: 115461
URL: http://llvm.org/viewvc/llvm-project?rev=115461&view=rev
Log:
Tweak to make clang blocks work with std::functional (very fragile)
Modified:
libcxx/trunk/include/__functional_base_03
Modified: libcxx/trunk/include/__functional_base_03
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__functional_base_03?rev=115461&r1=115460&r2=115461&view=diff
==============================================================================
--- libcxx/trunk/include/__functional_base_03 (original)
+++ libcxx/trunk/include/__functional_base_03 Sun Oct 3 08:59:56 2010
@@ -873,7 +873,7 @@
template <class _F>
inline _LIBCPP_INLINE_VISIBILITY
-typename result_of<_F()>::type
+decltype(declval<_F>()())
__invoke(_F __f)
{
return __f();
@@ -881,7 +881,7 @@
template <class _F, class _A0>
inline _LIBCPP_INLINE_VISIBILITY
-typename result_of<_F(_A0)>::type
+decltype(declval<_F>()(declval<_A0&>()))
__invoke(_F __f, _A0& __a0)
{
return __f(__a0);
@@ -889,7 +889,7 @@
template <class _F, class _A0, class _A1>
inline _LIBCPP_INLINE_VISIBILITY
-typename result_of<_F(_A0, _A1)>::type
+decltype(declval<_F>()(declval<_A0&>(), declval<_A1&>()))
__invoke(_F __f, _A0& __a0, _A1& __a1)
{
return __f(__a0, __a1);
@@ -897,7 +897,7 @@
template <class _F, class _A0, class _A1, class _A2>
inline _LIBCPP_INLINE_VISIBILITY
-typename result_of<_F(_A0, _A1, _A2)>::type
+decltype(declval<_F>()(declval<_A0&>(), declval<_A1&>(), declval<_A2&>()))
__invoke(_F __f, _A0& __a0, _A1& __a1, _A2& __a2)
{
return __f(__a0, __a1, __a2);
More information about the cfe-commits
mailing list