allocated_ptr.h (__allocated_ptr::operator=): Add missing return.
authorJonathan Wakely <jwakely@redhat.com>
Tue, 8 Jul 2014 13:22:14 +0000 (14:22 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 8 Jul 2014 13:22:14 +0000 (14:22 +0100)
* include/bits/allocated_ptr.h (__allocated_ptr::operator=): Add
missing return.
* include/experimental/any: Remove unused header.
* include/std/functional (_Maybe_wrap_member_pointer): Fix comments.
* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
* testsuite/util/testsuite_regex.h: Move include guard.

From-SVN: r212360

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/allocated_ptr.h
libstdc++-v3/include/experimental/any
libstdc++-v3/include/std/functional
libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc
libstdc++-v3/testsuite/util/testsuite_regex.h

index 41e6dde..7e03e79 100644 (file)
@@ -1,3 +1,12 @@
+2014-07-08  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/bits/allocated_ptr.h (__allocated_ptr::operator=): Add
+       missing return.
+       * include/experimental/any: Remove unused header.
+       * include/std/functional (_Maybe_wrap_member_pointer): Fix comments.
+       * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
+       * testsuite/util/testsuite_regex.h: Move include guard.
+
 2014-07-01  Tim Shen  <timshen@google.com>
 
        PR libstdc++/61601
index 5cdce20..4ae3836 100644 (file)
@@ -73,7 +73,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       }
 
       /// Release ownership of the owned pointer
-      __allocated_ptr& operator=(std::nullptr_t) noexcept { _M_ptr = nullptr; }
+      __allocated_ptr&
+      operator=(std::nullptr_t) noexcept
+      {
+       _M_ptr = nullptr;
+       return *this;
+      }
 
       /// Get the address that the owned pointer refers to.
       value_type* get() { return _S_raw_ptr(_M_ptr); }
index 8f6e372..a69d006 100644 (file)
@@ -41,7 +41,6 @@
 #include <type_traits>
 #include <bits/alloc_traits.h>
 #include <bits/uses_allocator.h>
-#include <bits/functexcept.h>
 
 namespace std _GLIBCXX_VISIBILITY(default)
 {
index e677c24..15247bf 100644 (file)
@@ -1184,8 +1184,8 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
 
   /**
    *  Maps member pointers into instances of _Mem_fn but leaves all
-   *  other function objects untouched. Used by tr1::bind(). The
-   *  primary template handles the non--member-pointer case.
+   *  other function objects untouched. Used by std::bind(). The
+   *  primary template handles the non-member-pointer case.
    */
   template<typename _Tp>
     struct _Maybe_wrap_member_pointer
@@ -1203,7 +1203,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type)
 
   /**
    *  Maps member pointers into instances of _Mem_fn but leaves all
-   *  other function objects untouched. Used by tr1::bind(). This
+   *  other function objects untouched. Used by std::bind(). This
    *  partial specialization handles the member pointer case.
    */
   template<typename _Tp, typename _Class>
index b93b039..9a12ec3 100644 (file)
@@ -26,5 +26,5 @@ void test01()
   using std::experimental::any_cast;
 
   const any y(1);
-  any_cast<int&>(y); // { dg-error "qualifiers" "" { target { *-*-* } } 381 }
+  any_cast<int&>(y); // { dg-error "qualifiers" "" { target { *-*-* } } 380 }
 }
index c2031e9..da20941 100644 (file)
 // <http://www.gnu.org/licenses/>.
 //
 
+#ifndef _TESTSUITE_REGEX_H
+#define _TESTSUITE_REGEX_H 1
+
 #include <regex>
 #include <stdexcept>
 #include <iostream>
 
-#ifndef _TESTSUITE_REGEX_H
-#define _TESTSUITE_REGEX_H 1
-
 namespace __gnu_test
 {
   // Test on a compilation of simple expressions, throw regex_error on error.