8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/constexpr-base6.C
Jason Merrill f8e94a0156 Core issue 2310 - conversion to base of incomplete type.
* class.c (build_base_path): Check COMPLETE_TYPE_P for source type.

From-SVN: r260127
2018-05-10 14:57:55 -04:00

15 lines
297 B
C

// CWG issue 2310
// { dg-do compile { target c++11 } }
// { dg-options "" }
template<typename A, typename B> struct check_derived_from {
static A a;
static constexpr B *p = &a; // { dg-error "" }
int ar[p-p+1];
};
struct W { int i; };
struct Z : W
{
check_derived_from<Z, W> cdf;
};