This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libstdc++] Proposed patch for fstream.h
- To: gcc-patches at gcc dot gnu dot org
- Subject: [libstdc++] Proposed patch for fstream.h
- From: Peter Schmid <schmid at snake dot iap dot physik dot tu-darmstadt dot de>
- Date: Thu, 22 Mar 2001 22:17:32 +0100 (CET)
- cc: libstdc++ at gcc dot gnu dot org
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