From 511c982015c35b0f05b0aaf2cd5df52fbfbd05ab Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 11 Aug 2016 11:41:33 -0500 Subject: [PATCH] Use DEAL_II_NOEXCEPT instead of 'throw()'. --- include/deal.II/base/exceptions.h | 16 ++++++++-------- include/deal.II/grid/tria.h | 2 +- include/deal.II/lac/solver_control.h | 4 ++-- source/base/exceptions.cc | 6 +++--- source/grid/tria.cc | 5 +++-- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h index fdad1604d4..dd5492f816 100644 --- a/include/deal.II/base/exceptions.h +++ b/include/deal.II/base/exceptions.h @@ -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; \ } \ diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index 64f910d8c2..b096131b23 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -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 diff --git a/include/deal.II/lac/solver_control.h b/include/deal.II/lac/solver_control.h index 77eb3252ae..f225dc0f35 100644 --- a/include/deal.II/lac/solver_control.h +++ b/include/deal.II/lac/solver_control.h @@ -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 { diff --git a/source/base/exceptions.cc b/source/base/exceptions.cc index d8d1b207ba..708494b2eb 100644 --- a/source/base/exceptions.cc +++ b/source/base/exceptions.cc @@ -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 == "") diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 9f7a9c3b33..0cbaa75972 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -13584,11 +13584,12 @@ Triangulation::memory_consumption () const template -Triangulation::DistortedCellList::~DistortedCellList () throw () +Triangulation::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 } -- 2.39.5