Remove cv qualifiers from member pointers in the __member_pointer_traits test. This was causing a const-qualified bind result to malfunction. This was a recent regression due to the new use of __member_pointer_traits in restricting the __invokable and __invoke_of tests.

llvm-svn: 181935
This commit is contained in:
Howard Hinnant 2013-05-15 21:49:27 +00:00
parent 598123ede4
commit 0125ab809f
2 changed files with 19 additions and 1 deletions

View File

@ -1653,7 +1653,7 @@ struct __member_pointer_traits_imp<_Rp _Class::*, false, true>
template <class _MP>
struct __member_pointer_traits
: public __member_pointer_traits_imp<_MP,
: public __member_pointer_traits_imp<typename remove_cv<_MP>::type,
is_member_function_pointer<_MP>::value,
is_member_object_pointer<_MP>::value>
{

View File

@ -260,6 +260,24 @@ test_void_2()
}
}
struct TFENode
{
bool foo(unsigned long long) const
{
return true;
}
};
void
test3()
{
using namespace std;
using namespace std::placeholders;
const auto f = bind(&TFENode::foo, _1, 0UL);
const TFENode n = TFENode{};
bool b = f(n);
}
int main()
{
test_void_1();