Browse Source

Noexcept added to the scope guard constructor (#100).

main
offa 7 years ago
parent
commit
a320126de6
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      include/detail/scope_guard_base.h

+ 2
- 1
include/detail/scope_guard_base.h View File

std::enable_if_t<(!std::is_lvalue_reference_v<EFP>) std::enable_if_t<(!std::is_lvalue_reference_v<EFP>)
&& std::is_nothrow_constructible_v<EF, EFP>, int> = 0 && std::is_nothrow_constructible_v<EF, EFP>, int> = 0
> >
explicit scope_guard_base(EFP&& exitFunction) : m_exitfunction(std::move(exitFunction)),
explicit scope_guard_base(EFP&& exitFunction) noexcept(std::is_nothrow_constructible_v<EF, EFP>)
: m_exitfunction(std::move(exitFunction)),
m_execute_on_destruction(true) m_execute_on_destruction(true)
{ {
} }

Loading…
Cancel
Save