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
* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-48324.C
blob
cef464cf9b89570b0af81ae544716a87c9c9eb56
1
// PR c++/48324
2
// { dg-do compile { target c++11 } }
3
4
struct S {
5
const int val;
6
constexpr S(int i) : val(i) { }
7
};
8
9
constexpr const int& to_ref(int i) {
10
return S(i).val; // { dg-warning "reference to temporary" }
11
}
12
13
constexpr int ary[to_ref(98)] = { }; // { dg-error "not an integral" }