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
PR c++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-template2.C
blob
29f63afe0df415dd22a78b24eb74cde08fef174b
1
// PR c++/47049
2
// { dg-do compile { target c++11 } }
3
4
enum { E = 0, F = 1 };
5
template <int N, int M = ((N == 1) ? F : E)> class S {};
6
template <int N>
7
struct T
8
{
9
static void
10
foo (S<N> *p)
11
{
12
S<N> u;
13
[&u] ()->bool {} ();
14
}
15
};
16
17
int main()
18
{
19
T<0>().foo(0);
20
}