Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / ext / has_nothrow_assign_odr.C
blob594d3a98672da5229fd9a3cacbe5e09016fd998c
1 // PR c++/36870
2 // { dg-do run }
5 #include <cassert>
7 struct S { const S& operator= (const S&); };
9 bool f ();
11 int main ()
13   assert (__has_nothrow_assign (S) == f ());
14   return 0;
17 const S& S::operator= (const S&a) { return a; }
19 bool f () { return __has_nothrow_assign (S); }