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++/82882 - ICE with lambda in template default argument.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
lambda
/
lambda-defarg8.C
blob
cf842ad9dd1051e794479bb33cee19b1692b2e73
1
// PR c++/82282
2
// { dg-do compile { target c++14 } }
3
4
template<typename = int>
5
void f(const char* a =
6
([](int = []{ static int i; return 42; }()) {
7
static int i;
8
return "";
9
}()));
10
11
template<typename = int>
12
struct X {
13
void f(const char* a =
14
([](int = [] { static int i; return 42; }()) {
15
enum { Size = 42 - 1 };
16
return "";
17
}()));
18
};
19
20
void g()
21
{
22
f();
23
X<int>().f();
24
}