Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jun 2003 11:44:11 -0700
From:      Jeffrey Hsu <hsu@FreeBSD.org>
To:        abowhill@blarg.net
Cc:        freebsd-current@FreeBSD.org
Subject:   <ftream> errors under g++ 3.2.2
Message-ID:  <200306291837.h5TIbckY015162@mta7.pltn13.pbi.net>

next in thread | raw e-mail | index | archive | help
  > file IO using <fstream> gives error messages about implicit typenames
  > being deprecated, and I can't for the life of me figure out what to do
  > my code to make the compiler happy

Change your /usr/include/g++/fstream as follows:

--- /usr/include/g++/fstream    Sun Jun 29 09:17:46 2003
+++ fstream     Sun Jun 29 11:33:38 2003
@@ -299,12 +299,12 @@
 
   // Generic definitions.
   template <typename _CharT, typename _Traits>
-    basic_filebuf<_CharT, _Traits>::int_type
+    typename basic_filebuf<_CharT, _Traits>::int_type
     basic_filebuf<_CharT, _Traits>::underflow() 
     { return _M_underflow_common(false); }
 
   template <typename _CharT, typename _Traits>
-    basic_filebuf<_CharT, _Traits>::int_type
+    typename basic_filebuf<_CharT, _Traits>::int_type
     basic_filebuf<_CharT, _Traits>::uflow() 
     { return _M_underflow_common(true); }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306291837.h5TIbckY015162>