mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 20:01:31 -05:00
* g++.dg/*.C: Use target c++17 instead of explicit dg-options. * lib/g++-dg.exp: Don't test C++11 by default. Add C++17 to the list of default stds to test. From-SVN: r265343
11 lines
263 B
C
11 lines
263 B
C
// Testcase from P0170R1
|
|
// { dg-do compile { target c++17 } }
|
|
|
|
void g() {
|
|
const int n = 0;
|
|
[=] {
|
|
constexpr int i = n; // OK, 'n' is not odr-used and not captured here.
|
|
constexpr int j = *&n; // { dg-error "" } '&n' would be an odr-use of 'n'.
|
|
};
|
|
}
|