Procházet zdrojové kódy

Const and no excepts fixed for the scope guard strategies.

main
offa před 8 roky
rodič
revize
bb7a9421c5
3 změnil soubory, kde provedl 3 přidání a 3 odebrání
  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 Zobrazit soubor



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

+ 1
- 1
include/scope_fail.h Zobrazit soubor



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

+ 1
- 1
include/scope_success.h Zobrazit soubor



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

Načítá se…
Zrušit
Uložit