blob: e38b968e7749389cc8b80d274a82232e3a14fac0 [file] [log] [blame]
// PR c++/85060
// { dg-do compile { target c++14 } }
struct CA {
constexpr int foo() const { return 42; }
};
template <class T>
struct CB : CA { };
template <class T>
struct CC : CB<T> {
constexpr int bar() const {
const int m = CA::foo();
return m;
}
constexpr int baz() const {
const T m = CA::foo();
return m;
}
};
constexpr CC<double> c;
static_assert( c.bar() == 42, "" );