This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] missing return in debug/vector _Safe_vector::operator=


broken on GCC 5 and trunk
Index: libstdc++-v3/ChangeLog
===================================================================
--- libstdc++-v3/ChangeLog	(revision 222523)
+++ libstdc++-v3/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2015-04-28  Stephan Bergmann  <sbergman@redhat.com>
+
+	* include/debug/vector (__gnu_debug):
+	Add missing return in _Safe_vector::operator=
+
 2015-04-28  Jonathan Wakely  <jwakely@redhat.com>
 
 	* libsupc++/exception (uncaught_exceptions): Add comment. Reorder #if.
Index: libstdc++-v3/include/debug/vector
===================================================================
--- libstdc++-v3/include/debug/vector	(revision 222523)
+++ libstdc++-v3/include/debug/vector	(working copy)
@@ -69,7 +69,10 @@
 
       _Safe_vector&
       operator=(const _Safe_vector&) noexcept
-      { _M_update_guaranteed_capacity(); }
+      {
+	_M_update_guaranteed_capacity();
+	return *this;
+      }
 
       _Safe_vector&
       operator=(_Safe_vector&& __x) noexcept
@@ -76,6 +79,7 @@
       {
 	_M_update_guaranteed_capacity();
 	__x._M_guaranteed_capacity = 0;
+	return *this;
       }
 #endif
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]