summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/include/type_traits2
-rw-r--r--libcxx/test/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp18
2 files changed, 19 insertions, 1 deletions
diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits
index cc8a68ecc6f..4997b4b17c1 100644
--- a/libcxx/include/type_traits
+++ b/libcxx/include/type_traits
@@ -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>
{
diff --git a/libcxx/test/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp b/libcxx/test/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp
index 6b18fa295bc..1125844a1f3 100644
--- a/libcxx/test/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp
+++ b/libcxx/test/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp
@@ -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();
OpenPOWER on IntegriCloud