blob: e640a1b5b7ed45ec269a6674b6142fbaae4c35ba [file] [log] [blame]
Howard Hinnant94b2dd02010-08-22 00:59:46 +00001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Howard Hinnant412dbeb2010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnant94b2dd02010-08-22 00:59:46 +00007//
8//===----------------------------------------------------------------------===//
9
10// test that <bitset> includes <cstddef>, <string>, <stdexcept> and <iosfwd>
11
12#include <bitset>
13
Eric Fiselier5750a3f2017-05-12 01:44:51 +000014template <class> void test_typedef() {}
Howard Hinnant94b2dd02010-08-22 00:59:46 +000015
16int main()
17{
Eric Fiselier5750a3f2017-05-12 01:44:51 +000018 { // test for <cstddef>
19 std::ptrdiff_t p; ((void)p);
20 std::size_t s; ((void)s);
21 std::nullptr_t np; ((void)np);
22 }
23 { // test for <string>
24 std::string s; ((void)s);
25 }
26 { // test for <stdexcept>
27 std::logic_error le("blah"); ((void)le);
28 std::runtime_error re("blah"); ((void)re);
29 }
30 { // test for <iosfwd>
31 test_typedef<std::ios>();
32 test_typedef<std::wios>();
33 test_typedef<std::istream>();
34 test_typedef<std::ostream>();
35 test_typedef<std::iostream>();
36 }
Howard Hinnant94b2dd02010-08-22 00:59:46 +000037}