You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/09/06 23:00:59 UTC

svn commit: r573376 - in /incubator/stdcxx/trunk: include/stdexcept src/invalid_argument.cpp src/length_error.cpp src/out_of_range.cpp src/overflow_error.cpp src/underflow_error.cpp

Author: sebor
Date: Thu Sep  6 14:00:58 2007
New Revision: 573376

URL: http://svn.apache.org/viewvc?rev=573376&view=rev
Log:
2007-08-09  Martin Sebor  <se...@roguewave.com>

	* stdexcept (invalid_argument, length_error, underflow_error,
	overflow_error, out_of_range): Declared virtual ctors to prevent
	them from being implicitly defined by the compiler (and to reduce
	the size of object files compiled from translation units that
	#include the header). See also change 553643.
	* invalid_argument.cpp: Defined virtual dtor.
	* length_error.cpp: Same.
	* underflow_error.cpp: Same.
	* overflow_error.cpp: Same.
	* out_of_range.cpp: Same.

Added:
    incubator/stdcxx/trunk/src/invalid_argument.cpp   (with props)
    incubator/stdcxx/trunk/src/length_error.cpp   (with props)
    incubator/stdcxx/trunk/src/out_of_range.cpp   (with props)
    incubator/stdcxx/trunk/src/overflow_error.cpp   (with props)
    incubator/stdcxx/trunk/src/underflow_error.cpp   (with props)
Modified:
    incubator/stdcxx/trunk/include/stdexcept

Modified: incubator/stdcxx/trunk/include/stdexcept
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/stdexcept?rev=573376&r1=573375&r2=573376&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/stdexcept (original)
+++ incubator/stdcxx/trunk/include/stdexcept Thu Sep  6 14:00:58 2007
@@ -79,6 +79,8 @@
     // extension
     _EXPLICIT invalid_argument (const char *__s = 0)
         : logic_error (__s) { }
+
+    virtual ~invalid_argument () _THROWS (());
 };
 
 
@@ -91,6 +93,8 @@
     // extension
     _EXPLICIT length_error (const char *__s = 0)
         : logic_error (__s) { }
+
+    virtual ~length_error () _THROWS (());
 };
 
 
@@ -103,6 +107,8 @@
     // extension
     _EXPLICIT out_of_range (const char *__s = 0)
         : logic_error (__s) { }
+
+    virtual ~out_of_range () _THROWS (());
 };
 
 
@@ -143,6 +149,8 @@
     // extension
     _EXPLICIT overflow_error (const char *__s = 0)
         : runtime_error (__s) { }
+
+    virtual ~overflow_error () _THROWS (());
 };
 
 
@@ -155,6 +163,8 @@
     // extension
     _EXPLICIT underflow_error (const char *__s = 0)
         : runtime_error (__s) { }
+
+    virtual ~underflow_error () _THROWS (());
 };
 
 

Added: incubator/stdcxx/trunk/src/invalid_argument.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/invalid_argument.cpp?rev=573376&view=auto
==============================================================================
--- incubator/stdcxx/trunk/src/invalid_argument.cpp (added)
+++ incubator/stdcxx/trunk/src/invalid_argument.cpp Thu Sep  6 14:00:58 2007
@@ -0,0 +1,43 @@
+/***************************************************************************
+ *
+ * invalid_argument.cpp - definitions of class invalid_argument members
+ *
+ * $Id$
+ *
+ ***************************************************************************
+ *
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ **************************************************************************/
+
+#define _RWSTD_LIB_SRC
+
+#include <stdexcept>
+#include <rw/_defs.h>
+
+
+_RWSTD_NAMESPACE (std) {
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ invalid_argument::
+~invalid_argument () _THROWS (())
+{
+    // no-op
+}
+
+}   // namespace std

Propchange: incubator/stdcxx/trunk/src/invalid_argument.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/src/invalid_argument.cpp
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/src/length_error.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/length_error.cpp?rev=573376&view=auto
==============================================================================
--- incubator/stdcxx/trunk/src/length_error.cpp (added)
+++ incubator/stdcxx/trunk/src/length_error.cpp Thu Sep  6 14:00:58 2007
@@ -0,0 +1,43 @@
+/***************************************************************************
+ *
+ * length_error.cpp - definitions of class length_error members
+ *
+ * $Id$
+ *
+ ***************************************************************************
+ *
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ **************************************************************************/
+
+#define _RWSTD_LIB_SRC
+
+#include <stdexcept>
+#include <rw/_defs.h>
+
+
+_RWSTD_NAMESPACE (std) {
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ length_error::
+~length_error () _THROWS (())
+{
+    // no-op
+}
+
+}   // namespace std

Propchange: incubator/stdcxx/trunk/src/length_error.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/src/length_error.cpp
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/src/out_of_range.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/out_of_range.cpp?rev=573376&view=auto
==============================================================================
--- incubator/stdcxx/trunk/src/out_of_range.cpp (added)
+++ incubator/stdcxx/trunk/src/out_of_range.cpp Thu Sep  6 14:00:58 2007
@@ -0,0 +1,43 @@
+/***************************************************************************
+ *
+ * out_of_range.cpp - definitions of class out_of_range members
+ *
+ * $Id$
+ *
+ ***************************************************************************
+ *
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ **************************************************************************/
+
+#define _RWSTD_LIB_SRC
+
+#include <stdexcept>
+#include <rw/_defs.h>
+
+
+_RWSTD_NAMESPACE (std) {
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ out_of_range::
+~out_of_range () _THROWS (())
+{
+    // no-op
+}
+
+}   // namespace std

Propchange: incubator/stdcxx/trunk/src/out_of_range.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/src/out_of_range.cpp
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/src/overflow_error.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/overflow_error.cpp?rev=573376&view=auto
==============================================================================
--- incubator/stdcxx/trunk/src/overflow_error.cpp (added)
+++ incubator/stdcxx/trunk/src/overflow_error.cpp Thu Sep  6 14:00:58 2007
@@ -0,0 +1,43 @@
+/***************************************************************************
+ *
+ * overflow_error.cpp - definitions of class overflow_error members
+ *
+ * $Id$
+ *
+ ***************************************************************************
+ *
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ **************************************************************************/
+
+#define _RWSTD_LIB_SRC
+
+#include <stdexcept>
+#include <rw/_defs.h>
+
+
+_RWSTD_NAMESPACE (std) {
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ overflow_error::
+~overflow_error () _THROWS (())
+{
+    // no-op
+}
+
+}   // namespace std

Propchange: incubator/stdcxx/trunk/src/overflow_error.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/src/overflow_error.cpp
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/stdcxx/trunk/src/underflow_error.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/underflow_error.cpp?rev=573376&view=auto
==============================================================================
--- incubator/stdcxx/trunk/src/underflow_error.cpp (added)
+++ incubator/stdcxx/trunk/src/underflow_error.cpp Thu Sep  6 14:00:58 2007
@@ -0,0 +1,43 @@
+/***************************************************************************
+ *
+ * underflow_error.cpp - definitions of class underflow_error members
+ *
+ * $Id$
+ *
+ ***************************************************************************
+ *
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ **************************************************************************/
+
+#define _RWSTD_LIB_SRC
+
+#include <stdexcept>
+#include <rw/_defs.h>
+
+
+_RWSTD_NAMESPACE (std) {
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+/* virtual */ underflow_error::
+~underflow_error () _THROWS (())
+{
+    // no-op
+}
+
+}   // namespace std

Propchange: incubator/stdcxx/trunk/src/underflow_error.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/stdcxx/trunk/src/underflow_error.cpp
------------------------------------------------------------------------------
    svn:keywords = Id