Browse Source

Helper variable template implemented.

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

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

}; };




template<class F, class S>
constexpr bool is_noexcept_dtor_v = is_noexcept_dtor<F, S>::value;



template<class EF, class Strategy> template<class EF, class Strategy>
class scope_guard_base : private Strategy class scope_guard_base : private Strategy
{ {
scope_guard_base(const scope_guard_base&) = delete; scope_guard_base(const scope_guard_base&) = delete;




~scope_guard_base() noexcept(is_noexcept_dtor<EF, Strategy>::value)
~scope_guard_base() noexcept(is_noexcept_dtor_v<EF, Strategy>)
{ {
if( (m_execute_on_destruction == true) && (this->should_execute() == true) ) if( (m_execute_on_destruction == true) && (this->should_execute() == true) )
{ {

Loading…
Cancel
Save