This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[libstdc++] Proposed patch for fstream.h


Does it make sense to expose the type streampos to the global
namespace in the backward compatibility header fstream.h?

The appended patch has the effect that code like

	streampos begin = file.tellg();
	file.seekg(begin);

compiles. Perhaps a similar patch should also be applied to iostream.h.

Peter Schmid

2001-03-22  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* include/backward/fstream.h:  Expose streampos to global
	  namespace.

*** libstdc++-v3/include/backward/fstream.h.orig	Wed Mar 21 16:53:22 2001
--- libstdc++-v3/include/backward/fstream.h	Wed Mar 21 16:53:43 2001
***************
*** 33,43 ****
--- 33,45 ----
  using std::ifstream;
  using std::ofstream;
  using std::fstream;
+ using std::streampos
  
  #ifdef _GLIBCPP_USE_WCHAR_T
  using std::wifstream;
  using std::wofstream;
  using std::wfstream;
+ using std::wstreampos
  #endif
  
  #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]