3 // Copyright (C) 1999-2013 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING3. If not see
18 // <http://www.gnu.org/licenses/>.
21 // 27.4.3 template class fpos
23 #include <cwchar> // for mbstate_t
26 #include <testsuite_hooks.h>
30 bool test
__attribute__((unused
)) = true;
32 typedef std::mbstate_t state_type
;
33 state_type state01
= state_type();
34 state_type state02
= state_type();
36 std::streampos
pos01(0);
37 std::streampos
pos02(0);
39 // 27.4.3.1 fpos members
40 // void state(state_type s);
41 // state_type state();
43 // XXX Need to have better sanity checking for the mbstate_t type,
44 // or whatever the insantiating type for class fpos happens to be
45 // for streampos, as things like equality operators and assignment
46 // operators, increment and deincrement operators need to be in
49 state01
= pos01
.state();
50 test
= std::memcmp(&state01
, &state02
, sizeof(state_type
)) == 0;