PR c++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / nsdmi-aggr6.C
blob83fdedde11e26290e6de20373d703426202fd808
1 // PR c++/77659
2 // { dg-do compile { target c++14 } }
4 template <typename Type> Type get_max_value(Type);
5 struct A {
6   struct B {
7     int baz = get_max_value(baz);
8   };
9   template <typename> void m_fn1() { new B{}; }
11 void foo() {
12   A a;
13   a.m_fn1<int>();