[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 9101ca7 1/2: Move "noreturn" attribute to dec
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 9101ca7 1/2: Move "noreturn" attribute to declaration from definition |
Date: |
Wed, 19 Apr 2017 18:31:16 -0400 (EDT) |
branch: master
commit 9101ca77ecd34c7dde4f7268c887dc643f501896
Author: Vadim Zeitlin <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Move "noreturn" attribute to declaration from definition
Use [[noreturn]] when declaring Skeleton class methods unconditionally
throwing exceptions, not when defining them.
---
skeleton.cpp | 2 --
skeleton.hpp | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/skeleton.cpp b/skeleton.cpp
index bcddd1f..5bfcb07 100644
--- a/skeleton.cpp
+++ b/skeleton.cpp
@@ -948,13 +948,11 @@ void Skeleton::UponTestAppFatal(wxCommandEvent&)
alarum() << "Test alarum() ." << LMI_FLUSH;
}
-[[noreturn]]
void Skeleton::UponTestAppStandardException(wxCommandEvent&)
{
throw std::runtime_error("Test a standard exception.");
}
-[[noreturn]]
void Skeleton::UponTestAppArbitraryException(wxCommandEvent&)
{
throw "Test an arbitrary exception.";
diff --git a/skeleton.hpp b/skeleton.hpp
index a6ef6e6..9c601a2 100644
--- a/skeleton.hpp
+++ b/skeleton.hpp
@@ -99,7 +99,9 @@ class Skeleton
void UponTestAppWarning (wxCommandEvent&);
void UponTestAppHobsons (wxCommandEvent&);
void UponTestAppFatal (wxCommandEvent&);
+ [[noreturn]]
void UponTestAppStandardException (wxCommandEvent&);
+ [[noreturn]]
void UponTestAppArbitraryException (wxCommandEvent&);
// Test alerts from shared library.