stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r680756 - in /stdcxx/branches/4.2.x: include/loc/_codecvt.cc include/loc/_codecvt.h include/loc/_collate.cc include/loc/_collate.h include/loc/_moneypunct.cc include/loc/_moneypunct.h src/codecvt.cpp src/collate.cpp src/wcodecvt.cpp
Date Tue, 29 Jul 2008 16:24:21 GMT
Author: sebor
Date: Tue Jul 29 09:24:16 2008
New Revision: 680756

URL: http://svn.apache.org/viewvc?rev=680756&view=rev
Log:
2008-07-29  Martin Sebor  <sebor@roguewave.com>

	* include/loc/_moneypunct.h (~moneypunct): Explicitly declared
	to prevent the compiler from generating a definition (and vtable)
	in every translation unit that uses the class.
	* include/loc/_codecvt.h (~codecvt, ~codecvt_byname): Same.
	* include/loc/_collate.h (~collate, ~collate_byname): Same.
	* include/loc/_codecvt.cc (~codecvt, ~codecvt_byname): Defined.
	* include/loc/_moneypunct.cc (~moneypunct): Same.
	* include/loc/_collate.cc (~collate, ~collate_byname): Same.
	* src/collate.cpp (~collate, ~collate_byname): Same.
	* src/codecvt.cpp (~codecvt): Same.
	* src/wcodecvt.cpp (~codecvt, ~codecvt_byname): Defined.

Modified:
    stdcxx/branches/4.2.x/include/loc/_codecvt.cc
    stdcxx/branches/4.2.x/include/loc/_codecvt.h
    stdcxx/branches/4.2.x/include/loc/_collate.cc
    stdcxx/branches/4.2.x/include/loc/_collate.h
    stdcxx/branches/4.2.x/include/loc/_moneypunct.cc
    stdcxx/branches/4.2.x/include/loc/_moneypunct.h
    stdcxx/branches/4.2.x/src/codecvt.cpp
    stdcxx/branches/4.2.x/src/collate.cpp
    stdcxx/branches/4.2.x/src/wcodecvt.cpp

Modified: stdcxx/branches/4.2.x/include/loc/_codecvt.cc
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_codecvt.cc?rev=680756&r1=680755&r2=680756&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_codecvt.cc (original)
+++ stdcxx/branches/4.2.x/include/loc/_codecvt.cc Tue Jul 29 09:24:16 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -35,7 +35,26 @@
 template <class _InternT, class _ExternT, class _StateT>
 _RW::__rw_facet_id codecvt<_InternT, _ExternT, _StateT>::id;
 
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _InternT, class _ExternT, class _StateT>
+/* virtual */ codecvt<_InternT, _ExternT, _StateT>::
+~codecvt () /* nothrow */
+{
+    // no-op
+}
+
 #endif   // _RWSTD_NO_EXT_CODECVT_PRIMARY
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _InternT, class _ExternT, class _StateT>
+/* virtual */ codecvt_byname<_InternT, _ExternT, _StateT>::
+~codecvt_byname () /* nothrow */
+{
+    // no-op
+}
+
 }   // namespace std

Modified: stdcxx/branches/4.2.x/include/loc/_codecvt.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_codecvt.h?rev=680756&r1=680755&r2=680756&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_codecvt.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_codecvt.h Tue Jul 29 09:24:16 2008
@@ -120,6 +120,8 @@
 
     _EXPLICIT codecvt (_RWSTD_SIZE_T __ref = 0): _RW::__rw_facet (__ref) { }
 
+    virtual ~codecvt () _RWSTD_ATTRIBUTE_NOTHROW;
+
     // 22,2,1,5,1, p1
     result out (state_type& __state,
                 const intern_type* __from, const intern_type* __from_end,
@@ -188,7 +190,7 @@
 
     _EXPLICIT codecvt (_RWSTD_SIZE_T = 0);
 
-    virtual ~codecvt ();
+    virtual ~codecvt () _RWSTD_ATTRIBUTE_NOTHROW;
 
     result out (state_type &__state,
                 const intern_type *__from, const intern_type* __from_end,
@@ -332,6 +334,8 @@
 
     _EXPLICIT codecvt (_RWSTD_SIZE_T = 0);
 
+    virtual ~codecvt () _RWSTD_ATTRIBUTE_NOTHROW;
+
     result out (state_type& __state,
                 const intern_type *__from, const intern_type *__from_end,
                 const intern_type *&__from_next,
@@ -398,6 +402,8 @@
         : codecvt <_InternT, _ExternT, _StateT> (__ref) {
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
+
+    virtual ~codecvt_byname () _RWSTD_ATTRIBUTE_NOTHROW;
 };
 
 
@@ -415,6 +421,8 @@
 
     _EXPLICIT codecvt_byname (const char*, _RWSTD_SIZE_T = 0);
 
+    virtual ~codecvt_byname () _RWSTD_ATTRIBUTE_NOTHROW;
+
 protected:
 
     virtual codecvt_base::result

Modified: stdcxx/branches/4.2.x/include/loc/_collate.cc
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_collate.cc?rev=680756&r1=680755&r2=680756&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_collate.cc (original)
+++ stdcxx/branches/4.2.x/include/loc/_collate.cc Tue Jul 29 09:24:16 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -35,6 +35,16 @@
 template <class _CharT>
 _RW::__rw_facet_id collate<_CharT>::id;
 
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT>
+/* virtual */ collate<_CharT>::
+~collate () /* nothrow */
+{
+    // no-op
+}
+
 #endif   // _RWSTD_NO_EXT_COLLATE_PRIMARY
 
 }   // namespace std

Modified: stdcxx/branches/4.2.x/include/loc/_collate.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_collate.h?rev=680756&r1=680755&r2=680756&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_collate.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_collate.h Tue Jul 29 09:24:16 2008
@@ -25,7 +25,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -66,6 +66,8 @@
     _EXPLICIT collate (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
+    virtual ~collate () _RWSTD_ATTRIBUTE_NOTHROW;
+
     int
     compare (const char_type* __low1, const char_type* __high1,
              const char_type* __low2, const char_type* __high2) const {
@@ -113,6 +115,8 @@
     _EXPLICIT collate (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
+    virtual ~collate () _RWSTD_ATTRIBUTE_NOTHROW;
+
     int
     compare (const char_type* __low1, const char_type* __high1,
              const char_type* __low2, const char_type* __high2) const {
@@ -156,9 +160,11 @@
                          allocator<char_type> >
     string_type;
 
-    _EXPLICIT collate (_RWSTD_SIZE_T __refs = 0)
+    _EXPLICIT collate (_RWSTD_SIZE_T __refs = 0) _THROWS (())
         : _RW::__rw_facet (__refs) { }
 
+    virtual ~collate () _RWSTD_ATTRIBUTE_NOTHROW;
+
     int
     compare (const char_type* __low1, const char_type* __high1,
              const char_type* __low2, const char_type* __high2) const {
@@ -182,7 +188,7 @@
     virtual int
     do_compare (const char_type*, const char_type*,
                 const char_type*, const char_type*) const;
-        
+
     virtual string_type
     do_transform (const char_type*, const char_type*) const;
 
@@ -218,6 +224,8 @@
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
 
+    virtual ~collate_byname () _RWSTD_ATTRIBUTE_NOTHROW;
+
 protected:
 
     virtual int
@@ -242,6 +250,8 @@
         this->_C_set_name (__name, _C_namebuf, sizeof _C_namebuf);
     }
 
+    virtual ~collate_byname () _RWSTD_ATTRIBUTE_NOTHROW;
+
 protected:
 
     virtual int

Modified: stdcxx/branches/4.2.x/include/loc/_moneypunct.cc
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_moneypunct.cc?rev=680756&r1=680755&r2=680756&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_moneypunct.cc (original)
+++ stdcxx/branches/4.2.x/include/loc/_moneypunct.cc Tue Jul 29 09:24:16 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -40,4 +40,14 @@
 
 #endif   // _RWSTD_NO_STATIC_CONST_MEMBER_INIT
 
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _CharT, bool _Intl>
+/* virtual */ moneypunct<_CharT, _Intl>::
+~moneypunct () /* nothrow */
+{
+    // no-op
+}
+
 }   // namespace std

Modified: stdcxx/branches/4.2.x/include/loc/_moneypunct.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/_moneypunct.h?rev=680756&r1=680755&r2=680756&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/include/loc/_moneypunct.h (original)
+++ stdcxx/branches/4.2.x/include/loc/_moneypunct.h Tue Jul 29 09:24:16 2008
@@ -25,7 +25,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -68,6 +68,8 @@
     _EXPLICIT moneypunct (_RWSTD_SIZE_T __refs = 0)
         : _RW::__rw_facet (__refs) { }
 
+    virtual ~moneypunct () _RWSTD_ATTRIBUTE_NOTHROW;
+
     char_type decimal_point () const {
         return do_decimal_point ();
     }

Modified: stdcxx/branches/4.2.x/src/codecvt.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/codecvt.cpp?rev=680756&r1=680755&r2=680756&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/codecvt.cpp (original)
+++ stdcxx/branches/4.2.x/src/codecvt.cpp Tue Jul 29 09:24:16 2008
@@ -105,7 +105,10 @@
 }
 
 
-/* virtual */ codecvt<char, char, _RWSTD_MBSTATE_T>::~codecvt ()
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ codecvt<char, char, _RWSTD_MBSTATE_T>::
+~codecvt ()
 {
     // no-op
 }

Modified: stdcxx/branches/4.2.x/src/collate.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/collate.cpp?rev=680756&r1=680755&r2=680756&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/collate.cpp (original)
+++ stdcxx/branches/4.2.x/src/collate.cpp Tue Jul 29 09:24:16 2008
@@ -787,7 +787,7 @@
 
 
 template <class _CharT>
-long __rw_hash (const _CharT *lo, const _CharT *hi)
+long __rw_hash (const _CharT *lo, const _CharT *hi) _THROWS (())
 {
     // Peter Weinberger's generic hashing algorithm, adapted by Andrew
     // Binstock from a version by Allen Holub (see Andrew Binstock,
@@ -843,6 +843,15 @@
 _RW::__rw_facet_id collate<char>::id;
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ collate<char>::
+~collate () /* nothrow */
+{
+    // no-op
+}
+
+
 int collate<char>::
 do_compare (const char_type *__lo1, const char_type *__hi1,
             const char_type *__lo2, const char_type *__hi2) const
@@ -888,6 +897,15 @@
 }
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ collate_byname<char>::
+~collate_byname () /* nothrow */
+{
+    // no-op
+}
+
+
 int collate_byname<char>::
 do_compare (const char* low1, const char* high1,
             const char* low2, const char* high2) const
@@ -996,6 +1014,15 @@
 _RW::__rw_facet_id collate<wchar_t>::id;
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ collate<wchar_t>::
+~collate () /* nothrow */
+{
+    // no-op
+}
+
+
 int collate<wchar_t>::
 do_compare (const char_type *__lo1, const char_type *__hi1,
             const char_type *__lo2, const char_type *__hi2) const
@@ -1062,6 +1089,15 @@
 }
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ collate_byname<wchar_t>::
+~collate_byname () /* nothrow */
+{
+    // no-op
+}
+
+
 int collate_byname<wchar_t>::
 do_compare (const wchar_t* low1, const wchar_t* high1,
             const wchar_t* low2, const wchar_t* high2) const

Modified: stdcxx/branches/4.2.x/src/wcodecvt.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/wcodecvt.cpp?rev=680756&r1=680755&r2=680756&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/src/wcodecvt.cpp (original)
+++ stdcxx/branches/4.2.x/src/wcodecvt.cpp Tue Jul 29 09:24:16 2008
@@ -1032,6 +1032,15 @@
 }
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ codecvt<wchar_t, char, _RWSTD_MBSTATE_T>::
+~codecvt ()
+{
+    // no-op
+}
+
+
 /* virtual */ bool
 codecvt<wchar_t, char, _RWSTD_MBSTATE_T>::
 do_always_noconv () const _THROWS (())
@@ -1305,6 +1314,15 @@
 }
 
 
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ codecvt_byname<wchar_t, char, _RWSTD_MBSTATE_T>::~
+codecvt_byname ()
+{
+    // no-op
+}
+
+
 /* virtual */ codecvt_base::result
 codecvt_byname<wchar_t, char, _RWSTD_MBSTATE_T>::
 do_in (state_type&         state,



Mime
View raw message