Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/template/dependent-base3.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
line wrap: on
line source
// 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, "" );