Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
tests
regress
27.filebuf.virtuals.stdcxx-522.cpp
Go to the documentation of this file.
1
29
#include <cassert>
30
#include <fstream>
31
#include <ios>
32
33
int
main
()
34
{
35
struct
MyBuf
: std::filebuf {
36
int_type overflow (int_type
c
) {
37
return
std::filebuf::overflow (
c
);
38
}
39
}
buf
;
40
41
buf
.open (
"file"
, std::ios::out);
42
buf
.pubsetbuf (0, 0);
43
buf
.overflow (std::filebuf::traits_type::eof ());
44
buf
.close ();
45
46
std::ifstream
in
(
"file"
);
47
assert
(std::istream::traits_type::eof () ==
in
.get ());
48
}
buf
#define buf
Definition
17.names.cpp:452
c
#define c
Definition
17.names.cpp:111
main
int main()
Definition
27.filebuf.virtuals.stdcxx-522.cpp:33
in
const int in
Definition
27.stringbuf.virtuals.cpp:442
assert
#define assert(expr)
Definition
_cassert.h:40
MyBuf
Definition
27.ostream.unformatted.stdcxx-626.cpp:35
Generated by
1.9.8