[PATCH] More implicit typename fixes

Paolo Carlini pcarlini@unitus.it
Fri Dec 21 13:45:00 GMT 2001


Hi all,

by compiling 17_intro/headers.cc with -Wsystem-headers I spotted a few more
implicit typename lurking in the library.

Ok to apply? (tested i686-pc-linux-gnu)

P.S. Interestingly, this time too (as already reported in
http://gcc.gnu.org/ml/libstdc++/2001-12/msg00327.html) I saw a spurious
(correct?) warning for line 169 of locale_facets.h:

  template<typename _CharT>
    class ctype : public __ctype_abstract_base<_CharT>
    {
    public:
      // Types:
      typedef _CharT      char_type;
      typedef typename ctype::mask  mask;       <====== 169

/////////////

2001-12-21  Paolo Carlini  <pcarlini@unitus.it>

        * include/bits/locale_facets.tcc (collate::do_transform):
        Adjust implicit typename.
        * config/locale/messages_members_generic.h (messages::open,
        messages::do_open, messages::do_get): Adjust implicit typename.
        * config/locale/messages_members_gnu.h (messages::open,
        messages::do_open, messages::do_get): Adjust Implicit typename
        * config/locale/messages_members_ieee_1003.1-200x.h (messages::open,
        messages::do_open, messages::do_get): Adjust implicit typename.


diff -urN libstdc++-v3-orig/config/locale/messages_members_generic.h
libstdc++-v3/config/locale/messages_members_generic.h
--- libstdc++-v3-orig/config/locale/messages_members_generic.h Sat Dec 15
20:41:22 2001
+++ libstdc++-v3/config/locale/messages_members_generic.h Fri Dec 21 22:06:10
2001
@@ -35,19 +35,19 @@

   // Non-virtual member functions.
   template<typename _CharT>
-    messages<_CharT>::catalog
+    typename messages<_CharT>::catalog
     messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
       const char*) const
     { return this->do_open(__s, __loc); }

   // Virtual member functions.
   template<typename _CharT>
-    messages<_CharT>::catalog
+    typename messages<_CharT>::catalog
     messages<_CharT>::do_open(const basic_string<char>&, const locale&) const
     { return 0; }

   template<typename _CharT>
-    messages<_CharT>::string_type
+    typename messages<_CharT>::string_type
     messages<_CharT>::do_get(catalog, int, int,
         const string_type& __dfault) const
     { return __dfault; }
diff -urN libstdc++-v3-orig/config/locale/messages_members_gnu.h
libstdc++-v3/config/locale/messages_members_gnu.h
--- libstdc++-v3-orig/config/locale/messages_members_gnu.h Sat Dec 15 20:41:22
2001
+++ libstdc++-v3/config/locale/messages_members_gnu.h Fri Dec 21 22:05:44 2001
@@ -35,7 +35,7 @@

   // Non-virtual member functions.
   template<typename _CharT>
-    messages<_CharT>::catalog
+    typename messages<_CharT>::catalog
     messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
       const char* __dir) const
     {
@@ -44,7 +44,7 @@
     }

   template<typename _CharT>
-    messages<_CharT>::catalog
+    typename messages<_CharT>::catalog
     messages<_CharT>::do_open(const basic_string<char>& __s,
          const locale&) const
     {
@@ -55,7 +55,7 @@
     }

   template<typename _CharT>
-    messages<_CharT>::string_type
+    typename messages<_CharT>::string_type
     messages<_CharT>::do_get(catalog, int, int,
         const string_type& __dfault) const
     {
diff -urN libstdc++-v3-orig/config/locale/messages_members_ieee_1003.1-200x.h
libstdc++-v3/config/locale/messages_members_ieee_1003.1-200x.h
--- libstdc++-v3-orig/config/locale/messages_members_ieee_1003.1-200x.h Wed Aug
8 04:48:58 2001
+++ libstdc++-v3/config/locale/messages_members_ieee_1003.1-200x.h Fri Dec 21
22:06:39 2001
@@ -35,7 +35,7 @@

   // Non-virtual member functions.
   template<typename _CharT>
-    messages<_CharT>::catalog
+    typename messages<_CharT>::catalog
     messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
       const char*) const
     { return this->do_open(__s, __loc); }
@@ -46,13 +46,13 @@
     { }

   template<typename _CharT>
-    messages<_CharT>::catalog
+    typename messages<_CharT>::catalog
     messages<_CharT>::do_open(const basic_string<char>& __s,
          const locale&) const
     { return reinterpret_cast<catalog>(catopen(__s.c_str(), NL_CAT_LOCALE)); }

   template<typename _CharT>
-    messages<_CharT>::string_type
+    typename messages<_CharT>::string_type
     messages<_CharT>::do_get(catalog __c, int __setid, int __msgid,
         const string_type& __dfault) const
     {
diff -urN libstdc++-v3-orig/include/bits/locale_facets.tcc
libstdc++-v3/include/bits/locale_facets.tcc
--- libstdc++-v3-orig/include/bits/locale_facets.tcc Wed Dec 12 20:19:01 2001
+++ libstdc++-v3/include/bits/locale_facets.tcc Fri Dec 21 22:04:36 2001
@@ -1974,7 +1974,7 @@
     }

  template<typename _CharT>
-    collate<_CharT>::string_type
+    typename collate<_CharT>::string_type
     collate<_CharT>::
     do_transform(const _CharT* __lo, const _CharT* __hi) const
     {





More information about the Libstdc++ mailing list