Debian Codegraph @

gcc/testsuite/g++.dg/template/non-dependent25a.C

raw
1 // PR c++/109480
2 // A version of non-dependent25.C where b's initializer is a constant
3 // expression.
4 // { dg-do compile { target c++11 } }
5
6 template<class T>
7 struct A {
8 void f() {
9 constexpr A<int> a;
10 const bool b = a.g(); // { dg-bogus "private" }
11 }
12
13 private:
14 constexpr bool g() const { return true; }
15 };
16
17 template struct A<int>;