[libcxx] r181217 - Expose accidentally removed __compressed_pair constructor taking piecewise_construct_t. This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .

Howard Hinnant hhinnant at apple.com
Mon May 6 09:58:36 PDT 2013


Author: hhinnant
Date: Mon May  6 11:58:36 2013
New Revision: 181217

URL: http://llvm.org/viewvc/llvm-project?rev=181217&view=rev
Log:
Expose accidentally removed __compressed_pair constructor taking piecewise_construct_t.  This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .

Modified:
    libcxx/trunk/include/memory
    libcxx/trunk/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp

Modified: libcxx/trunk/include/memory
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/memory?rev=181217&r1=181216&r2=181217&view=diff
==============================================================================
--- libcxx/trunk/include/memory (original)
+++ libcxx/trunk/include/memory Mon May  6 11:58:36 2013
@@ -2036,6 +2036,10 @@ public:
             return *this;
         }
 
+#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#endif  // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
     template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
@@ -2051,10 +2055,6 @@ public:
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#endif  // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
-
     _LIBCPP_INLINE_VISIBILITY _T1_reference       first() _NOEXCEPT       {return __first_;}
     _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const _NOEXCEPT {return __first_;}
 
@@ -2131,6 +2131,10 @@ public:
             return *this;
         }
 
+#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#endif  // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
     template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
@@ -2146,10 +2150,6 @@ public:
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#endif  // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
-
     _LIBCPP_INLINE_VISIBILITY _T1_reference       first() _NOEXCEPT       {return *this;}
     _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const _NOEXCEPT {return *this;}
 
@@ -2227,6 +2227,10 @@ public:
             return *this;
         }
 
+#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#endif  // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
     template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
@@ -2243,10 +2247,6 @@ public:
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#endif  // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
-
     _LIBCPP_INLINE_VISIBILITY _T1_reference       first() _NOEXCEPT       {return __first_;}
     _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const _NOEXCEPT {return __first_;}
 
@@ -2321,6 +2321,10 @@ public:
             return *this;
         }
 
+#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#endif  // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
     template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
@@ -2336,10 +2340,6 @@ public:
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#endif  // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
-
     _LIBCPP_INLINE_VISIBILITY _T1_reference       first() _NOEXCEPT       {return *this;}
     _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const _NOEXCEPT {return *this;}
 
@@ -2409,6 +2409,10 @@ public:
             return *this;
         }
 
+#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#endif  // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+
 #ifndef _LIBCPP_HAS_NO_VARIADICS
 
     template <class... _Args1, class... _Args2>
@@ -2422,10 +2426,6 @@ public:
 
 #endif  // _LIBCPP_HAS_NO_VARIADICS
 
-#endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
-#endif  // _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
-
     _LIBCPP_INLINE_VISIBILITY _T1_reference       first() _NOEXCEPT       {return base::first();}
     _LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const _NOEXCEPT {return base::first();}
 

Modified: libcxx/trunk/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp?rev=181217&r1=181216&r2=181217&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp (original)
+++ libcxx/trunk/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp Mon May  6 11:58:36 2013
@@ -49,6 +49,11 @@ int A::count = 0;
 
 int g(int) {return 0;}
 
+class Foo {
+public:
+  void bar(int k) { }
+};
+
 int main()
 {
     {
@@ -77,4 +82,9 @@ int main()
     assert(f);
     assert(f.target<int (A::*)(int) const>() != 0);
     }
+    {
+    Foo f;
+    std::function<void(int)> fun = std::bind(&Foo::bar, &f, std::placeholders::_1);
+    fun(10);
+    }
 }





More information about the cfe-commits mailing list