Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/constexpr-base6.C

raw
1 // CWG issue 2310
2 // { dg-do compile { target c++11 } }
3 // { dg-options "" }
4
5 template<typename A, typename B> struct check_derived_from {
6 static A a;
7 static constexpr B *p = &a; // { dg-error "" }
8 int ar[p-p+1];
9 };
10 struct W { int i; };
11 struct Z : W
12 {
13 check_derived_from<Z, W> cdf;
14 };