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
/
cpp1y
/
pr60573.C
blob
da730f80f06002f3f8eecec8171f31fb13fcbc1f
1
// PR c++/60573
2
// { dg-do compile { target c++14 } }
3
// { dg-options "" }
4
5
struct A
6
{
7
struct B
8
{
9
void foo(auto);
10
};
11
12
void B::foo(auto) {} // { dg-error "cannot define" }
13
14
struct X
15
{
16
struct Y
17
{
18
struct Z
19
{
20
void foo(auto);
21
};
22
};
23
24
void Y::Z::foo(auto) {} // { dg-error "cannot define" }
25
};
26
27
void X::Y::Z::foo(auto) {} // { dg-error "cannot define" }
28
};