blob: beed348abb7510cc9f55fb1f17290c4596312cf7 [file] [log] [blame]
Argyrios Kyrtzidis34f52d12011-04-22 01:18:40 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3// Don't crash.
4
5template<typename,typename=int,typename=int>struct basic_string;
6
7typedef basic_string<char> string;
8
9
10
11template<typename aT,typename,typename oc>
12struct basic_string
13{
14int us;
15basic_string(const aT*,const oc&a=int());
16
17int _S_construct();
18
19int _S_construct(int);
20
21_S_construct(); // expected-error {{requires}}
22};
23
24template<typename _CharT,typename _Traits,typename _Alloc>
25basic_string<_CharT,_Traits,_Alloc>::basic_string(const _CharT*,const _Alloc&)
26:us(_S_construct)
27{string a;}
28
Eli Friedmane9ee3822012-02-22 04:49:04 +000029struct runtime_error{runtime_error(string);};
Argyrios Kyrtzidis34f52d12011-04-22 01:18:40 +000030
Eli Friedmane9ee3822012-02-22 04:49:04 +000031struct system_error:runtime_error{ // expected-note {{to match}}
32system_error():time_error("" // expected-error 3 {{expected}} expected-note {{to match}}