]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/pod/3983-2.cc
1 // 2001-06-05 Benjamin Kosnik <bkoz@redhat.com>
3 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4 // Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
22 // 27.4.2.1.6 class ios_base::init
26 #include <testsuite_hooks.h>
27 #include <testsuite_character.h>
30 // Sentry uses locale info, so have to try one formatted input/output.
34 using __gnu_test::pod_ushort
;
35 typedef pod_ushort::value_type value_type
;
36 typedef basic_stringbuf
<pod_ushort
> stringbuf_type
;
37 typedef basic_istream
<pod_ushort
> istream_type
;
39 stringbuf_type strbuf01
;
40 istream_type
iss(&strbuf01
);
42 bool test
__attribute__((unused
)) = true;
45 pod_ushort arr
[6] = { { value_type('a') }, { value_type('b') },
46 { value_type('c') }, { value_type('d') },
47 { value_type('e') } };
53 catch (std::bad_cast
& obj
)
55 catch (std::exception
& obj
)
60 // Explicitly instantiate for systems with no COMDAT or weak support.
62 const std::basic_string
<__gnu_test::pod_ushort
>::size_type
63 std::basic_string
<__gnu_test::pod_ushort
>::_Rep::_S_max_size
;
66 const __gnu_test::pod_ushort
67 std::basic_string
<__gnu_test::pod_ushort
>::_Rep::_S_terminal
;