[Bug c++/84364] [8 Regression] -Weffc++ warns on "return *this" in template after r253599
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 13 15:38:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84364
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
// PR c++/84364
// { dg-do compile }
// { dg-options "-Weffc++" }
template <typename T>
struct A {
A &operator=(A<T>&& f) {
return *this; // { dg-bogus "should return a reference to" }
}
};
is enough to reproduce this.
More information about the Gcc-bugs
mailing list