// PR c++/96204 // { dg-do compile { target c++14 } } // A variant of access40a.C where has_type_member is a variable template instead // of a class template. template struct A { template static constexpr bool has_type_member = false; }; template template constexpr int A::has_type_member = true; struct Child { private: friend struct A; typedef void type; }; // The partial specialization matches because A is a friend of Child. static_assert(A::has_type_member, ""); using type1 = const int; using type1 = decltype(A::has_type_member); static_assert(!A::has_type_member, ""); using type2 = const bool; using type2 = decltype(A::has_type_member);