OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
344e94e101e624654602aa8ffa475e2e45123689
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
init
/
reference3.C
1
// { dg-do compile }
2
// This code used to be accepted but it is invalid as there is no
3
// value initialization of a reference type.
4
// PR c++/36695
5
6
template <typename T>
7
T f()
8
{
9
T a = T(); // { dg-error "value-initialization of reference" }
10
}
11
12
int &a = f<int&>(); // { dg-message "instantiated from here" }
13