PR tree-optimization/67955
[official-gcc.git] / gcc / testsuite / g++.dg / ext / has_nothrow_assign_odr.C
blobc2e99ef5444213b756afda0c44e00954643b0d03
1 // PR c++/36870
2 // { dg-do run }
3 #include <cassert>
5 struct S { const S& operator= (const S&); };
7 bool f ();
9 int main ()
11   assert (__has_nothrow_assign (S) == f ());
14 const S& S::operator= (const S&) { }
16 bool f () { return __has_nothrow_assign (S); }