c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / nontype4.C
blobb6a1ae7fc9bd954236c1bc9222df4ebc70cad044
1 // PR c++/56428
2 // { dg-do compile { target c++11 } }
3 // { dg-additional-options "-fdelete-null-pointer-checks" }
5 struct A { };
7 template<bool B>
8   struct Builder
9   {
10     static A build() { return A(); }
11   };
13 template<A (*F)()>
14   A f()
15   {
16     return Builder<F != nullptr>::build();
17   }
19 A g();
21 int main()
23   f< &g >();
24   f< nullptr >();
25   f< &f<nullptr> >();