PR78494 add missing returns to propagate_const
authorFelix Morgner <felix.morgner@gmail.com>
Wed, 23 Nov 2016 14:45:29 +0000 (14:45 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 23 Nov 2016 14:45:29 +0000 (14:45 +0000)
2016-11-23  Felix Morgner  <felix.morgner@gmail.com>
    Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/78494
* include/experimental/propagate_const (propagate_const::operator=):
Add missing return statements.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Adjust dg-error line numbers.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r242760

libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/propagate_const
libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc
libstdc++-v3/testsuite/experimental/propagate_const/requirements2.cc

index 70197d9eb1ff4a210a8dd383ab34138bea44064b..3ee623cdaf252c9bc127cbaf9ee40d15e2eefdd9 100644 (file)
@@ -1,3 +1,13 @@
+2016-11-23  Felix Morgner  <felix.morgner@gmail.com>
+           Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/78494
+       * include/experimental/propagate_const (propagate_const::operator=):
+       Add missing return statements.
+       * testsuite/experimental/propagate_const/assignment/move_neg.cc:
+       Adjust dg-error line numbers.
+       * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
+
 2016-11-22  Uros Bizjak  <ubizjak@gmail.com>
 
        * testsuite/Makefile.am
index 5f32111fbba241105f7a581cb6bf0f41a3e94867..635d4ed39fcd9f2a5a7d01a796bb3ca33478df52 100644 (file)
@@ -156,6 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       constexpr propagate_const& operator=(propagate_const<_Up>&& __pu)
       {
        _M_t = std::move(get_underlying(__pu));
+       return *this;
       }
 
       template <typename _Up, typename =
@@ -166,6 +167,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       constexpr propagate_const& operator=(_Up&& __u)
       {
        _M_t = std::forward<_Up>(__u);
+       return *this;
       }
 
       // [propagate_const.const_observers], const observers
index 0dc72a214f403567228ff0330d3a9072de339285..1423220abe8137101fedc6adbe43b2658e18621c 100644 (file)
@@ -25,7 +25,7 @@
 using std::experimental::propagate_const;
 using std::unique_ptr;
 
-// { dg-error "no type" "" { target *-*-* } 161 }
+// { dg-error "no type" "" { target *-*-* } 162 }
 
 int main()
 {
index 199be37a1a63d501e84083803772161ac8147c7c..d713911d8971d30a670b7929b66521db8be49a81 100644 (file)
@@ -23,7 +23,7 @@ using std::experimental::propagate_const;
 
 // { dg-error "requires a class or a pointer to an object type" "" { target *-*-* } 107 }
 // { dg-error "not a pointer-to-object type" "" { target *-*-* } 68 }
-// { dg-error "forming pointer to reference type" "" { target *-*-* } 187 }
-// { dg-error "forming pointer to reference type" "" { target *-*-* } 213 }
+// { dg-error "forming pointer to reference type" "" { target *-*-* } 189 }
+// { dg-error "forming pointer to reference type" "" { target *-*-* } 215 }
 
 propagate_const<void*> test1;