mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 20:01:31 -05:00
* pt.c (tsubst_copy) [VAR_DECL]: Register the dummy instantiation before substituting its initializer. From-SVN: r246289
16 lines
210 B
C
16 lines
210 B
C
// PR c++/79640
|
|
// { dg-do compile { target c++14 } }
|
|
|
|
template<typename F> void foo(F f)
|
|
{
|
|
f(1);
|
|
}
|
|
|
|
template<int> void bar()
|
|
{
|
|
const int i = i;
|
|
foo([] (auto) { sizeof(i); });
|
|
}
|
|
|
|
void baz() { bar<1>(); }
|