1 // { dg-do compile { target c++11 } }
2 // { dg-options "-fdiagnostics-show-caret" }
3 
4 class is_not_empty
5 {
6   int i;
7 };
8 
9 /* Verify location of static_assert failure (and of traits).  */
10 
11 static_assert(__is_empty(is_not_empty), "message"); // { dg-error "static assertion failed: message" }
12 /* { dg-begin-multiline-output "" }
13  static_assert(__is_empty(is_not_empty), "message");
14                ^~~~~~~~~~~~~~~~~~~~~~~~
15    { dg-end-multiline-output "" } */
16 
17 
18 /* Again, this time verifying location of "noexcept".  */
19 
20 extern void might_throw ();
21 
22 static_assert(noexcept(might_throw ()), "message"); // { dg-error "static assertion failed: message" }
23 /* { dg-begin-multiline-output "" }
24  static_assert(noexcept(might_throw ()), "message");
25                ^~~~~~~~~~~~~~~~~~~~~~~~
26    { dg-end-multiline-output "" } */
27