Fix a problem with reference_wrapper in C++03 that was causing counting predicates to fail. Add a test to make sure it works. However, most of the reference_wrapper tests still fail in C++03 mode, due to a lack of decltype. No change there.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214760 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2014-08-04 19:20:17 +00:00
parent b4ed5ca01e
commit 529d303340
2 changed files with 21 additions and 3 deletions

View File

@@ -1027,7 +1027,7 @@ public:
typename __invoke_return0<type&, _A0>::type
operator() (_A0& __a0) const
{
return __invoke(get(), __a0);
return __invoke<type&, _A0>(get(), __a0);
}
template <class _A0, class _A1>
@@ -1035,7 +1035,7 @@ public:
typename __invoke_return1<type&, _A0, _A1>::type
operator() (_A0& __a0, _A1& __a1) const
{
return __invoke(get(), __a0, __a1);
return __invoke<type&, _A0, _A1>(get(), __a0, __a1);
}
template <class _A0, class _A1, class _A2>
@@ -1043,7 +1043,7 @@ public:
typename __invoke_return2<type&, _A0, _A1, _A2>::type
operator() (_A0& __a0, _A1& __a1, _A2& __a2) const
{
return __invoke(get(), __a0, __a1, __a2);
return __invoke<type&, _A0, _A1, _A2>(get(), __a0, __a1, __a2);
}
};