1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <sstream>
11 
12 //  template<class charT, class traits = char_traits<charT>,
13 //           class Allocator = allocator<charT>>
14 //    class basic_stringbuf;
15 //
16 // The char type of the stream and the char_type of the traits have to match
17 
18 #include <sstream>
19 
main()20 int main()
21 {
22 	std::basic_stringbuf<char, std::char_traits<wchar_t> > sb;
23 //  expected-error-re@streambuf:* {{static_assert failed{{.*}} "traits_type::char_type must be the same type as CharT"}}
24 //  expected-error-re@string:* {{static_assert failed{{.*}} "traits_type::char_type must be the same type as CharT"}}
25 }
26 
27