repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
c++: prvalue of array type [PR111286]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
nontype4.C
blob
b6a1ae7fc9bd954236c1bc9222df4ebc70cad044
1
// PR c++/56428
2
// { dg-do compile { target c++11 } }
3
// { dg-additional-options "-fdelete-null-pointer-checks" }
4
5
struct A { };
6
7
template<bool B>
8
struct Builder
9
{
10
static A build() { return A(); }
11
};
12
13
template<A (*F)()>
14
A f()
15
{
16
return Builder<F != nullptr>::build();
17
}
18
19
A g();
20
21
int main()
22
{
23
f< &g >();
24
f< nullptr >();
25
f< &f<nullptr> >();
26
}