Pārlūkot izejas kodu

Formatting.

main
offa pirms 7 gadiem
vecāks
revīzija
46c5770080
1 mainītis faili ar 8 papildinājumiem un 4 dzēšanām
  1. +8
    -4
      include/scope_guard_base.h

+ 8
- 4
include/scope_guard_base.h Parādīt failu

std::enable_if_t<(!std::is_lvalue_reference<EFP>::value) std::enable_if_t<(!std::is_lvalue_reference<EFP>::value)
&& std::is_nothrow_constructible<EF, EFP>::value, int> = 0 && std::is_nothrow_constructible<EF, EFP>::value, int> = 0
> >
explicit scope_guard_base(EFP&& exitFunction) : m_exitFunction(std::move(exitFunction)), m_execute_on_destruction(true)
explicit scope_guard_base(EFP&& exitFunction) : m_exitFunction(std::move(exitFunction)),
m_execute_on_destruction(true)
{ {
} }


std::enable_if_t<std::is_constructible<EF, EFP>::value, int> = 0, std::enable_if_t<std::is_constructible<EF, EFP>::value, int> = 0,
std::enable_if_t<std::is_lvalue_reference<EFP>::value, int> = 0 std::enable_if_t<std::is_lvalue_reference<EFP>::value, int> = 0
> >
explicit scope_guard_base(EFP&& exitFunction) try : m_exitFunction(exitFunction), m_execute_on_destruction(true)
explicit scope_guard_base(EFP&& exitFunction) try : m_exitFunction(exitFunction),
m_execute_on_destruction(true)
{ {
} }
catch( ... ) catch( ... )
template<class T = EF, template<class T = EF,
std::enable_if_t<std::is_nothrow_move_constructible<T>::value, int> = 0 std::enable_if_t<std::is_nothrow_move_constructible<T>::value, int> = 0
> >
scope_guard_base(scope_guard_base&& other) noexcept(std::is_nothrow_move_constructible<T>::value || std::is_nothrow_copy_constructible<T>::value)
scope_guard_base(scope_guard_base&& other) noexcept(std::is_nothrow_move_constructible<T>::value
|| std::is_nothrow_copy_constructible<T>::value)
: m_exitFunction(std::move(other.m_exitFunction)), : m_exitFunction(std::move(other.m_exitFunction)),
m_execute_on_destruction(other.m_execute_on_destruction) m_execute_on_destruction(other.m_execute_on_destruction)
{ {
template<class T = EF, template<class T = EF,
std::enable_if_t<!std::is_nothrow_move_constructible<T>::value, int> = 0 std::enable_if_t<!std::is_nothrow_move_constructible<T>::value, int> = 0
> >
scope_guard_base(scope_guard_base&& other) noexcept(std::is_nothrow_move_constructible<T>::value || std::is_nothrow_copy_constructible<T>::value)
scope_guard_base(scope_guard_base&& other) noexcept(std::is_nothrow_move_constructible<T>::value
|| std::is_nothrow_copy_constructible<T>::value)
: m_exitFunction(other.m_exitFunction), : m_exitFunction(other.m_exitFunction),
m_execute_on_destruction(other.m_execute_on_destruction) m_execute_on_destruction(other.m_execute_on_destruction)
{ {

Notiek ielāde…
Atcelt
Saglabāt