repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-nonlit2.C
blob
0717f06a9779239c2030b822ca62e2cd096e0ed3
1
// { dg-do compile { target c++11 } }
2
3
struct A
4
{
5
~A();
6
};
7
8
template<class T>
9
struct W {
10
T t;
11
template<class U>
12
constexpr W(U&& u) : t(u) {}
13
};
14
15
template <class T>
16
constexpr W<T> make_w(T& w) { return W<T>(w); }
17
18
A a;
19
constexpr auto w = make_w(a); // { dg-error "16:the type .const W<A>. of .constexpr. variable .w. is not literal" }