Skip to content

Commit

Permalink
Merge Pull Request trilinos#4561 from gsjaardema/Trilinos/warning_fixes
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: SEACAS: Fix more warnings due to throw()
PR Author: gsjaardema
  • Loading branch information
trilinos-autotester authored Mar 7, 2019
2 parents d4949b7 + a98fc8f commit eb6ba1c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packages/seacas/libraries/ioss/src/Ioss_ScopeGuard.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ class ScopeGuardImplBase

protected:
~ScopeGuardImplBase() = default;
ScopeGuardImplBase(const ScopeGuardImplBase &other) throw() : dismissed_(other.dismissed_)
ScopeGuardImplBase(const ScopeGuardImplBase &other) : dismissed_(other.dismissed_)
{
other.Dismiss();
}
template <typename J> static void SafeExecute(J &j) throw()
template <typename J> static void SafeExecute(J &j)
{
if (!j.dismissed_) {
try {
Expand All @@ -74,8 +74,8 @@ class ScopeGuardImplBase
mutable bool dismissed_;

public:
ScopeGuardImplBase() throw() : dismissed_(false) {}
void Dismiss() const throw() { dismissed_ = true; }
ScopeGuardImplBase() : dismissed_(false) {}
void Dismiss() const { dismissed_ = true; }
};

// typedef const ScopeGuardImplBase& ScopeGuard;
Expand All @@ -85,7 +85,7 @@ template <typename F> class ScopeGuardImpl0 : public ScopeGuardImplBase
{
public:
static ScopeGuardImpl0<F> MakeGuard(F fun) { return ScopeGuardImpl0<F>(fun); }
~ScopeGuardImpl0() throw() { SafeExecute(*this); }
~ScopeGuardImpl0() { SafeExecute(*this); }
void Execute() { fun_(); }

protected:
Expand All @@ -102,7 +102,7 @@ template <typename F, typename P1> class ScopeGuardImpl1 : public ScopeGuardImpl
{
public:
static ScopeGuardImpl1<F, P1> MakeGuard(F fun, P1 p1) { return ScopeGuardImpl1<F, P1>(fun, p1); }
~ScopeGuardImpl1() throw() { SafeExecute(*this); }
~ScopeGuardImpl1() { SafeExecute(*this); }
void Execute() { fun_(p1_); }

protected:
Expand All @@ -123,7 +123,7 @@ template <typename F, typename P1, typename P2> class ScopeGuardImpl2 : public S
{
return ScopeGuardImpl2<F, P1, P2>(fun, p1, p2);
}
~ScopeGuardImpl2() throw() { SafeExecute(*this); }
~ScopeGuardImpl2() { SafeExecute(*this); }
void Execute() { fun_(p1_, p2_); }

protected:
Expand All @@ -147,7 +147,7 @@ class ScopeGuardImpl3 : public ScopeGuardImplBase
{
return ScopeGuardImpl3<F, P1, P2, P3>(fun, p1, p2, p3);
}
~ScopeGuardImpl3() throw() { SafeExecute(*this); }
~ScopeGuardImpl3() { SafeExecute(*this); }
void Execute() { fun_(p1_, p2_, p3_); }

protected:
Expand All @@ -173,7 +173,7 @@ template <class Obj, typename MemFun> class ObjScopeGuardImpl0 : public ScopeGua
{
return ObjScopeGuardImpl0<Obj, MemFun>(obj, memFun);
}
~ObjScopeGuardImpl0() throw() { SafeExecute(*this); }
~ObjScopeGuardImpl0() { SafeExecute(*this); }
void Execute() { (obj_.*memFun_)(); }

protected:
Expand Down Expand Up @@ -208,7 +208,7 @@ class ObjScopeGuardImpl1 : public ScopeGuardImplBase
{
return ObjScopeGuardImpl1<Obj, MemFun, P1>(obj, memFun, p1);
}
~ObjScopeGuardImpl1() throw() { SafeExecute(*this); }
~ObjScopeGuardImpl1() { SafeExecute(*this); }
void Execute() { (obj_.*memFun_)(p1_); }

protected:
Expand Down Expand Up @@ -246,7 +246,7 @@ class ObjScopeGuardImpl2 : public ScopeGuardImplBase
{
return ObjScopeGuardImpl2<Obj, MemFun, P1, P2>(obj, memFun, p1, p2);
}
~ObjScopeGuardImpl2() throw() { SafeExecute(*this); }
~ObjScopeGuardImpl2() { SafeExecute(*this); }
void Execute() { (obj_.*memFun_)(p1_, p2_); }

protected:
Expand Down

0 comments on commit eb6ba1c

Please sign in to comment.