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 // <iosfwd> 10 11 #include <iosfwd> 12 13 #include "test_macros.h" 14 15 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 16 # include <cwchar> 17 #endif 18 test()19template <class Ptr> void test() 20 { 21 Ptr p = 0; 22 ((void)p); // Prevent unused warning 23 } 24 main(int,char **)25int main(int, char**) 26 { 27 test<std::char_traits<char>* >(); 28 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 29 test<std::char_traits<wchar_t>* >(); 30 #endif 31 test<std::char_traits<unsigned short>*>(); 32 33 test<std::basic_ios<char>* >(); 34 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 35 test<std::basic_ios<wchar_t>* >(); 36 #endif 37 test<std::basic_ios<unsigned short>*>(); 38 39 test<std::basic_streambuf<char>* >(); 40 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 41 test<std::basic_streambuf<wchar_t>* >(); 42 #endif 43 test<std::basic_streambuf<unsigned short>*>(); 44 45 test<std::basic_istream<char>* >(); 46 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 47 test<std::basic_istream<wchar_t>* >(); 48 #endif 49 test<std::basic_istream<unsigned short>*>(); 50 51 test<std::basic_ostream<char>* >(); 52 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 53 test<std::basic_ostream<wchar_t>* >(); 54 #endif 55 test<std::basic_ostream<unsigned short>*>(); 56 57 test<std::basic_iostream<char>* >(); 58 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 59 test<std::basic_iostream<wchar_t>* >(); 60 #endif 61 test<std::basic_iostream<unsigned short>*>(); 62 63 test<std::basic_stringbuf<char>* >(); 64 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 65 test<std::basic_stringbuf<wchar_t>* >(); 66 #endif 67 test<std::basic_stringbuf<unsigned short>*>(); 68 69 test<std::basic_istringstream<char>* >(); 70 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 71 test<std::basic_istringstream<wchar_t>* >(); 72 #endif 73 test<std::basic_istringstream<unsigned short>*>(); 74 75 test<std::basic_ostringstream<char>* >(); 76 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 77 test<std::basic_ostringstream<wchar_t>* >(); 78 #endif 79 test<std::basic_ostringstream<unsigned short>*>(); 80 81 test<std::basic_stringstream<char>* >(); 82 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 83 test<std::basic_stringstream<wchar_t>* >(); 84 #endif 85 test<std::basic_stringstream<unsigned short>*>(); 86 87 test<std::basic_filebuf<char>* >(); 88 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 89 test<std::basic_filebuf<wchar_t>* >(); 90 #endif 91 test<std::basic_filebuf<unsigned short>*>(); 92 93 test<std::basic_ifstream<char>* >(); 94 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 95 test<std::basic_ifstream<wchar_t>* >(); 96 #endif 97 test<std::basic_ifstream<unsigned short>*>(); 98 99 test<std::basic_ofstream<char>* >(); 100 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 101 test<std::basic_ofstream<wchar_t>* >(); 102 #endif 103 test<std::basic_ofstream<unsigned short>*>(); 104 105 test<std::basic_fstream<char>* >(); 106 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 107 test<std::basic_fstream<wchar_t>* >(); 108 #endif 109 test<std::basic_fstream<unsigned short>*>(); 110 111 test<std::istreambuf_iterator<char>* >(); 112 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 113 test<std::istreambuf_iterator<wchar_t>* >(); 114 #endif 115 test<std::istreambuf_iterator<unsigned short>*>(); 116 117 test<std::ostreambuf_iterator<char>* >(); 118 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 119 test<std::ostreambuf_iterator<wchar_t>* >(); 120 #endif 121 test<std::ostreambuf_iterator<unsigned short>*>(); 122 123 test<std::ios* >(); 124 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 125 test<std::wios*>(); 126 #endif 127 128 test<std::streambuf*>(); 129 test<std::istream* >(); 130 test<std::ostream* >(); 131 test<std::iostream* >(); 132 133 test<std::stringbuf* >(); 134 test<std::istringstream*>(); 135 test<std::ostringstream*>(); 136 test<std::stringstream* >(); 137 138 test<std::filebuf* >(); 139 test<std::ifstream*>(); 140 test<std::ofstream*>(); 141 test<std::fstream* >(); 142 143 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 144 test<std::wstreambuf*>(); 145 test<std::wistream* >(); 146 test<std::wostream* >(); 147 test<std::wiostream* >(); 148 149 test<std::wstringbuf* >(); 150 test<std::wistringstream*>(); 151 test<std::wostringstream*>(); 152 test<std::wstringstream* >(); 153 154 test<std::wfilebuf* >(); 155 test<std::wifstream*>(); 156 test<std::wofstream*>(); 157 test<std::wfstream* >(); 158 #endif 159 160 test<std::fpos<std::mbstate_t>*>(); 161 test<std::streampos* >(); 162 #ifndef TEST_HAS_NO_WIDE_CHARACTERS 163 test<std::wstreampos* >(); 164 #endif 165 166 return 0; 167 } 168