OSDN Git Service

PR java/43504
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / ext / has_nothrow_assign_odr.C
1 // PR c++/36870
2 // { dg-do "run" }
3 #include <cassert>
4
5 struct S { const S& operator= (const S&); };
6
7 bool f ();
8
9 int main ()
10 {
11   assert (__has_nothrow_assign (S) == f ());
12 }
13
14 const S& S::operator= (const S&) { }
15
16 bool f () { return __has_nothrow_assign (S); }