Core issue 2310 - conversion to base of incomplete type.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-base6.C
blob849ac81db7859622b2bfe125f5094b74974538be
1 // CWG issue 2310
2 // { dg-do compile { target c++11 } }
3 // { dg-options "" }
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
13   check_derived_from<Z, W> cdf;