]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use DEAL_II_NOEXCEPT instead of 'throw()'.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 11 Aug 2016 16:41:33 +0000 (11:41 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 11 Aug 2016 19:42:41 +0000 (14:42 -0500)
include/deal.II/base/exceptions.h
include/deal.II/grid/tria.h
include/deal.II/lac/solver_control.h
source/base/exceptions.cc
source/grid/tria.cc

index fdad1604d4f0e26fa97452511bad659ce9e3e4aa..dd5492f816d8e90c03207bb2048f35b274cb0bb7 100644 (file)
@@ -55,7 +55,7 @@ public:
   /**
    * Destructor.
    */
-  virtual ~ExceptionBase () throw();
+  virtual ~ExceptionBase () DEAL_II_NOEXCEPT;
 
   /**
    * Set the file name and line of where the exception appeared as well as the
@@ -72,7 +72,7 @@ public:
   /**
    * Override the standard function that returns the description of the error.
    */
-  virtual const char *what() const throw();
+  virtual const char *what() const DEAL_II_NOEXCEPT;
 
   /**
    * Get exception name.
@@ -391,7 +391,7 @@ namespace deal_II_exceptions
   {                                                                       \
   public:                                                                 \
     Exception (const std::string &msg = defaulttext) : arg (msg) {}       \
-    virtual ~Exception () throw () {}                                     \
+    virtual ~Exception () DEAL_II_NOEXCEPT {}                             \
     virtual void print_info (std::ostream &out) const {                   \
       out << arg << std::endl;                                            \
     }                                                                     \
@@ -409,7 +409,7 @@ namespace deal_II_exceptions
   class Exception1 : public dealii::ExceptionBase {                       \
   public:                                                                 \
     Exception1 (const type1 a1) : arg1 (a1) {}                            \
-    virtual ~Exception1 () throw () {}                                    \
+    virtual ~Exception1 () DEAL_II_NOEXCEPT {}                            \
     virtual void print_info (std::ostream &out) const {                   \
       out outsequence << std::endl;                                       \
     }                                                                     \
@@ -429,7 +429,7 @@ namespace deal_II_exceptions
   public:                                                                 \
     Exception2 (const type1 a1, const type2 a2) :                         \
       arg1 (a1), arg2(a2) {}                                              \
-    virtual ~Exception2 () throw () {}                                    \
+    virtual ~Exception2 () DEAL_II_NOEXCEPT {}                            \
     virtual void print_info (std::ostream &out) const {                   \
       out outsequence << std::endl;                                       \
     }                                                                     \
@@ -450,7 +450,7 @@ namespace deal_II_exceptions
   public:                                                                 \
     Exception3 (const type1 a1, const type2 a2, const type3 a3) :         \
       arg1 (a1), arg2(a2), arg3(a3) {}                                    \
-    virtual ~Exception3 () throw () {}                                    \
+    virtual ~Exception3 () DEAL_II_NOEXCEPT {}                            \
     virtual void print_info (std::ostream &out) const {                   \
       out outsequence << std::endl;                                       \
     }                                                                     \
@@ -473,7 +473,7 @@ namespace deal_II_exceptions
     Exception4 (const type1 a1, const type2 a2,                           \
                 const type3 a3, const type4 a4) :                         \
       arg1 (a1), arg2(a2), arg3(a3), arg4(a4) {}                          \
-    virtual ~Exception4 () throw () {}                                    \
+    virtual ~Exception4 () DEAL_II_NOEXCEPT {}                            \
     virtual void print_info (std::ostream &out) const {                   \
       out outsequence << std::endl;                                       \
     }                                                                     \
@@ -497,7 +497,7 @@ namespace deal_II_exceptions
     Exception5 (const type1 a1, const type2 a2, const type3 a3,           \
                 const type4 a4, const type5 a5) :                         \
       arg1 (a1), arg2(a2), arg3(a3), arg4(a4), arg5(a5) {}                \
-    virtual ~Exception5 () throw () {}                                    \
+    virtual ~Exception5 () DEAL_II_NOEXCEPT {}                            \
     virtual void print_info (std::ostream &out) const {                   \
       out outsequence << std::endl;                                       \
     }                                                                     \
index 64f910d8c216698050d1b882c3cdb3f57a9b1376..b096131b237dda18162ec94efd32b0a3d9a06dda 100644 (file)
@@ -1462,7 +1462,7 @@ public:
      * automatically generated destructor would have a different one due to
      * member objects.
      */
-    virtual ~DistortedCellList () throw();
+    virtual ~DistortedCellList () DEAL_II_NOEXCEPT;
 
     /**
      * A list of those cells among the coarse mesh cells that are deformed or
index 77eb3252aee7354d40e5f9b98404ce167a4db6d6..f225dc0f358218f5b7e68eaae359fa9c9730691f 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1998 - 2015 by the deal.II authors
+// Copyright (C) 1998 - 2016 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -99,7 +99,7 @@ public:
       : last_step (last_step), last_residual(last_residual)
     {}
 
-    virtual ~NoConvergence () throw () {}
+    virtual ~NoConvergence () DEAL_II_NOEXCEPT {}
 
     virtual void print_info (std::ostream &out) const
     {
index d8d1b207baac7f7ddf3ce3cc72b215e997f150ff..708494b2ebda4272b9234cc694f39f8408d00959 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 1998 - 2014 by the deal.II authors
+// Copyright (C) 1998 - 2016 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -87,7 +87,7 @@ ExceptionBase::ExceptionBase (const ExceptionBase &exc)
 
 
 
-ExceptionBase::~ExceptionBase () throw ()
+ExceptionBase::~ExceptionBase () DEAL_II_NOEXCEPT
 {
   free (stacktrace); // free(NULL) is allowed
   stacktrace = NULL;
@@ -117,7 +117,7 @@ void ExceptionBase::set_fields (const char *f,
 #endif
 }
 
-const char *ExceptionBase::what() const throw()
+const char *ExceptionBase::what() const DEAL_II_NOEXCEPT
 {
   // If no error c_string was generated so far, do it now:
   if (what_str == "")
index 9f7a9c3b33f50dce877d3a3366f6870d810d18dd..0cbaa759724c343e9d1f8c08dbc6081dac412c60 100644 (file)
@@ -13584,11 +13584,12 @@ Triangulation<dim, spacedim>::memory_consumption () const
 
 
 template<int dim, int spacedim>
-Triangulation<dim, spacedim>::DistortedCellList::~DistortedCellList () throw ()
+Triangulation<dim, spacedim>::DistortedCellList::~DistortedCellList () DEAL_II_NOEXCEPT
 {
   // don't do anything here. the compiler will automatically convert
   // any exceptions created by the destructors of the member variables
-  // into abort() in order to satisfy the throw() specification
+  // into abort() in order to satisfy the throw()/noexcept
+  // specification
 }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.