Showing posts with label stream. Show all posts
Showing posts with label stream. Show all posts

Thursday, 9 June 2011

Why copy-semantics of stream classes from Standard Library are disabled?

C++ Standard IO Library defines several  stream classes, such as std::istream, std::ostream, std::iostream, std::ifstream, std::ofstream, std::fstream, std::istringstream, std::ostringstream, std::stringstream, and their wide-character counterparts.  Copy-semantic of all these streams has been disabled by having made the copy constructor and copy-assignment private, which means one cannot make a copy of stream object: