Mercurial > hg > CbC > CbC_llvm
view clang/test/SemaTemplate/ctad.cpp @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | 2e18cbf3894f |
children |
line wrap: on
line source
// RUN: %clang_cc1 -std=c++17 -verify %s namespace pr41427 { template <typename T> class A { public: A(void (*)(T)) {} }; void D(int) {} void f() { A a(&D); using T = decltype(a); using T = A<int>; } } namespace Access { struct B { protected: struct type {}; }; template<typename T> struct D : B { // expected-note {{not viable}} D(T, typename T::type); // expected-note {{private member}} }; D b = {B(), {}}; class X { using type = int; }; D x = {X(), {}}; // expected-error {{no viable constructor or deduction guide}} // Once we implement proper support for dependent nested name specifiers in // friends, this should still work. class Y { template <typename T> friend D<T>::D(T, typename T::type); // expected-warning {{dependent nested name specifier}} struct type {}; }; D y = {Y(), {}}; class Z { template <typename T> friend class D; struct type {}; }; D z = {Z(), {}}; }