// RUN: %clang_cc1 -verify %s namespace default_args { template struct char_traits; template struct allocator; template, typename = allocator> struct basic_string {}; typedef basic_string string; template T f(T); void test1() { string s; f(s).size(); // expected-error {{no member named 'size' in 'default_args::basic_string'}} } template struct default_delete {}; template> class unique_ptr { public: void f() { T::error(); } // expected-error {{no member named 'error' in 'default_args::basic_string'}} }; template class unique_ptr {}; void test2() { unique_ptr ups; f(ups).reset(); // expected-error {{no member named 'reset' in 'default_args::unique_ptr>'}} f(ups).f(); // expected-note {{in instantiation of member function 'default_args::unique_ptr>::f' requested here}} } template struct Z { int error[B]; }; // expected-error {{negative size}} Z<-1> z; // expected-note {{in instantiation of template class 'default_args::Z<-1>' requested here}} template class A = allocator, template class B = A> struct Q {}; void test3() { f(Q<>()).g(); // expected-error {{no member named 'g' in 'default_args::Q<>'}} f(Q()).g(); // expected-error {{no member named 'g' in 'default_args::Q<>'}} f(Q()).g(); // expected-error {{no member named 'g' in 'default_args::Q<>'}} f(Q()).g(); // expected-error {{no member named 'g' in 'default_args::Q'}} f(Q()).g(); // expected-error {{no member named 'g' in 'default_args::Q'}} f(Q()).g(); // expected-error {{no member named 'g' in 'default_args::Q'}} } }