1 // Testcase from P0170R1
2 // { dg-options -std=c++17 }
3
g()4 void g() {
5 const int n = 0;
6 [=] {
7 constexpr int i = n; // OK, 'n' is not odr-used and not captured here.
8 constexpr int j = *&n; // { dg-error "" } '&n' would be an odr-use of 'n'.
9 };
10 }
11