Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
moose-x86 committed Jun 25, 2018
1 parent 687950d commit 1fb65b6
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions inc/owned_pointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ class link_ptr
T* const ptr;
};

template<typename T>
struct is_expired_enabled :
std::integral_constant<bool, std::has_virtual_destructor<T>::value
#if __cplusplus >= 201402L
&& !std::is_final_v<T>
#endif
> {};

} // namespace _priv

template<typename Tp>
Expand Down Expand Up @@ -342,19 +350,6 @@ owned_pointer<T>::owned_pointer(element_type *const p, const bool acquired)
_priv::acquired(base_type::operator*()) = acquired;
}

namespace _priv
{

template<typename T>
struct is_expired_enabled :
std::integral_constant<bool, std::has_virtual_destructor<T>::value
#if __cplusplus >= 201402L
&& !std::is_final_v<T>
#endif
> {};
}


/*****************************************************************************************
*
* Public non-member functions
Expand Down

0 comments on commit 1fb65b6

Please sign in to comment.