Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
27.stringbuf.seekoff.stdcxx-295.cpp
Go to the documentation of this file.
1
29#include <cassert>
30#include <sstream>
31
32int main()
33{
34 std::istringstream in;
35 std::ostringstream out;
36 std::stringstream inout;
37
38 // DR453:
39 // http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#453
40 //
41 // changes 27.7.1.3, p10 (seekoff, called by tellg() and tellp())
42 // to read:
43 //
44 // For a sequence to be positioned, if its next pointer (either
45 // gptr() or pptr()) is a null pointer and the new offset newoff
46 // is nonzero, the positioning operation fails.
47
48 assert (0 == in.tellg ());
49 assert (0 == out.tellp ());
50 assert (0 == inout.tellg ());
51 assert (0 == inout.tellp ());
52
53#ifndef _RWSTD_NO_WCHAR_T
54
55 std::wistringstream win;
56 std::wostringstream wout;
57 std::wstringstream winout;
58
59 assert (0 == win.tellg ());
60 assert (0 == wout.tellp ());
61 assert (0 == winout.tellg ());
62 assert (0 == winout.tellp ());
63
64#endif // _RWSTD_NO_WCHAR_T
65
66}
const int out
const int in
#define assert(expr)
Definition _cassert.h:40