codecvt.h: Add virtual member function declarations.
authorBenjamin Kosnik <bkoz@redhat.com>
Wed, 31 Oct 2001 20:05:33 +0000 (20:05 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Wed, 31 Oct 2001 20:05:33 +0000 (20:05 +0000)
2001-10-31  Benjamin Kosnik  <bkoz@redhat.com>

libstdc++/4749
* include/bits/codecvt.h: Add virtual member function declarations.
* src/codecvt.cc: Tweaks.
* testsuite/22_locale/codecvt.cc: Test compilation only,
non-required facets not required to have linkage.

From-SVN: r46685

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/codecvt.h
libstdc++-v3/src/codecvt.cc
libstdc++-v3/testsuite/22_locale/codecvt.cc

index db31eeecc185f5c55288b32064679ac4a3904f78..bf6780e8de227fcf5a52bed40a8cca237950162b 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-31  Benjamin Kosnik  <bkoz@redhat.com>
+
+       libstdc++/4749
+       * include/bits/codecvt.h: Add virtual member function declarations.
+       * src/codecvt.cc: Tweaks.
+       * testsuite/22_locale/codecvt.cc: Test compilation only,
+       non-required facets not required to have linkage.
+       
 2001-10-31  Edward E. Meyer  <edward.e.meyer@boeing.com>
 
        libstdc++/4622
index 448cffacdf6119ead5147141f46688a2bfbc3744..441f40c9fe38b0698560dc494769c76a95049512 100644 (file)
     protected:
       virtual 
       ~codecvt() { }
+
+      virtual result
+      do_out(state_type& __state, const intern_type* __from, 
+            const intern_type* __from_end, const intern_type*& __from_next,
+            extern_type* __to, extern_type* __to_end,
+            extern_type*& __to_next) const;
+
+      virtual result
+      do_unshift(state_type& __state, extern_type* __to, 
+                extern_type* __to_end, extern_type*& __to_next) const;
+      
+      virtual result
+      do_in(state_type& __state, const extern_type* __from, 
+           const extern_type* __from_end, const extern_type*& __from_next, 
+           intern_type* __to, intern_type* __to_end, 
+           intern_type*& __to_next) const;
+      
+      virtual int 
+      do_encoding() const throw();
+
+      virtual bool 
+      do_always_noconv() const throw();
+
+      virtual int 
+      do_length(const state_type&, const extern_type* __from, 
+               const extern_type* __end, size_t __max) const;
+
+      virtual int 
+      do_max_length() const throw();
     };
 
   template<typename _InternT, typename _ExternT, typename _StateT>
 #endif
 
 #endif // _CPP_BITS_CODECVT_H
-
-
-
-
index 3a798fc5182dd3fe495cb31fafdf8ea3d002f728..5e7cdb69bdbcb35e725201ef52ed72a6841f8d0d 100644 (file)
@@ -46,7 +46,7 @@ namespace std
   
   codecvt_base::result
   codecvt<char, char, mbstate_t>::
-  do_out(state_type& /*__state*/, const intern_type* __from, 
+  do_out(state_type&, const intern_type* __from, 
         const intern_type* __from_end, const intern_type*& __from_next,
         extern_type* __to, extern_type* __to_end, 
         extern_type*& __to_next) const
@@ -60,8 +60,8 @@ namespace std
   
   codecvt_base::result
   codecvt<char, char, mbstate_t>::
-  do_unshift(state_type& /*__state*/, extern_type* __to,
-             extern_type* /*__to_end*/, extern_type*& __to_next) const
+  do_unshift(state_type&, extern_type* __to,
+             extern_type*, extern_type*& __to_next) const
   { 
     __to_next = __to; 
     return noconv; 
@@ -69,7 +69,7 @@ namespace std
   
   codecvt_base::result
   codecvt<char, char, mbstate_t>::
-  do_in(state_type& /*__state*/, const extern_type* __from, 
+  do_in(state_type&, const extern_type* __from, 
        const extern_type* __from_end, const extern_type*& __from_next,
        intern_type* __to, intern_type* __to_end, 
        intern_type*& __to_next) const
@@ -93,7 +93,7 @@ namespace std
   
   int 
   codecvt<char, char, mbstate_t>::
-  do_length (const state_type& /*__state*/, const extern_type* __from,
+  do_length (const state_type&, const extern_type* __from,
             const extern_type* __end, size_t __max) const
   { return min(__max, static_cast<size_t>(__end - __from)); }
   
@@ -142,8 +142,8 @@ namespace std
   
   codecvt_base::result
   codecvt<wchar_t, char, mbstate_t>::
-  do_unshift(state_type& /*__state*/, extern_type* __to,
-            extern_type* /*__to_end*/, extern_type*& __to_next) const
+  do_unshift(state_type&, extern_type* __to,
+            extern_type*, extern_type*& __to_next) const
   {
     __to_next = __to;
     return noconv;
@@ -190,7 +190,7 @@ namespace std
   
   int 
   codecvt<wchar_t, char, mbstate_t>::
-  do_length(const state_type& /*__state*/, const extern_type* __from,
+  do_length(const state_type&, const extern_type* __from,
            const extern_type* __end, size_t __max) const
   { return min(__max, static_cast<size_t>(__end - __from)); }
 
@@ -200,5 +200,3 @@ namespace std
   { return 1; }
 #endif //  _GLIBCPP_USE_WCHAR_T
 } // namespace std
-
-
index 19dc2717681a1634892d7c1f86389fc0ddb10048..a4670b7c9b57d506d2cee1377abf0499189cf811 100644 (file)
@@ -20,6 +20,8 @@
 
 // 22.2.1.5  Template class codecvt
 
+// { dg-do compile }
+
 #include <locale>
 
 void test01()