Przeglądaj źródła

Const and no excepts fixed for the scope guard strategies.

main
offa 7 lat temu
rodzic
commit
bb7a9421c5
3 zmienionych plików z 3 dodań i 3 usunięć
  1. +1
    -1
      include/scope_exit.h
  2. +1
    -1
      include/scope_fail.h
  3. +1
    -1
      include/scope_success.h

+ 1
- 1
include/scope_exit.h Wyświetl plik

@@ -29,7 +29,7 @@ namespace sr

struct scope_exit_strategy
{
constexpr bool should_execute() const
bool should_execute() const noexcept
{
return true;
}

+ 1
- 1
include/scope_fail.h Wyświetl plik

@@ -30,7 +30,7 @@ namespace sr

struct scope_fail_strategy
{
bool should_execute() const
bool should_execute() const noexcept
{
return uncaught_exceptions() > m_uncaught_on_creation;
}

+ 1
- 1
include/scope_success.h Wyświetl plik

@@ -30,7 +30,7 @@ namespace sr

struct scope_success_strategy
{
bool should_execute() const
bool should_execute() const noexcept
{
return uncaught_exceptions() <= m_uncaught_on_creation;
}

Ładowanie…
Anuluj
Zapisz