Bladeren bron

Helper variable template implemented.

main
offa 7 jaren geleden
bovenliggende
commit
4a8f9af492
1 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. +6
    -1
      include/detail/scope_guard_base.h

+ 6
- 1
include/detail/scope_guard_base.h Bestand weergeven

@@ -35,6 +35,11 @@ namespace detail
};


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



template<class EF, class Strategy>
class scope_guard_base : private Strategy
{
@@ -91,7 +96,7 @@ namespace detail
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) )
{

Laden…
Annuleren
Opslaan