1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // <istream>
10 
11 // template <class charT, class traits = char_traits<charT> >
12 // class basic_istream;
13 
14 // The char type of the stream and the char_type of the traits have to match
15 
16 #include <istream>
17 #include <type_traits>
18 #include <cassert>
19 
20 struct test_istream
21     : public std::basic_istream<char, std::char_traits<wchar_t> > {};
22 
23 
main(int,char **)24 int main(int, char**)
25 {
26 //  expected-error-re@ios:* {{static_assert failed{{.*}} "traits_type::char_type must be the same type as CharT"}}
27 
28   return 0;
29 }
30