[libcxx] r181935 - 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.
Howard Hinnant
hhinnant at apple.com
Wed May 15 14:49:27 PDT 2013
Author: hhinnant
Date: Wed May 15 16:49:27 2013
New Revision: 181935
URL: http://llvm.org/viewvc/llvm-project?rev=181935&view=rev
Log:
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.
Modified:
libcxx/trunk/include/type_traits
libcxx/trunk/test/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp
Modified: libcxx/trunk/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=181935&r1=181934&r2=181935&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Wed May 15 16:49:27 2013
@@ -1653,7 +1653,7 @@ struct __member_pointer_traits_imp<_Rp _
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>
{
Modified: libcxx/trunk/test/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp?rev=181935&r1=181934&r2=181935&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp (original)
+++ libcxx/trunk/test/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp Wed May 15 16:49:27 2013
@@ -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();
More information about the cfe-commits
mailing list