2018-10-23 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / expr / pmf-3.C
blobb94cd8ea63827abdfcfd8090238d77d65bde7d6a
1 // PR c++/80485
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-fdelete-null-pointer-checks" }
5 struct dummy {
6   void nonnull() {};
7   void nonnull2();
8 };
10 typedef void (dummy::*safe_bool)();
12 constexpr safe_bool a = &dummy::nonnull;
13 constexpr safe_bool b = &dummy::nonnull2;
15 static_assert( static_cast<bool>( a ), "" );
16 static_assert( static_cast<bool>( b ), "" );