Browse Source

Decays removed from SFINAE (fixes #22).

main
offa 7 years ago
parent
commit
6bced82d22
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      include/unique_resource.h

+ 2
- 2
include/unique_resource.h View File

return m_resource; return m_resource;
} }


template<class R = std::decay_t<Ressource>,
template<class R = Ressource,
std::enable_if_t<std::is_pointer<R>::value && std::enable_if_t<std::is_pointer<R>::value &&
( std::is_class<std::remove_pointer_t<R>>::value ( std::is_class<std::remove_pointer_t<R>>::value
|| std::is_union<std::remove_pointer_t<R>>::value ), int> = 0> || std::is_union<std::remove_pointer_t<R>>::value ), int> = 0>
return m_resource; return m_resource;
} }


template<class R = std::decay_t<Ressource>,
template<class R = Ressource,
std::enable_if_t<std::is_pointer<R>::value, int> = 0> std::enable_if_t<std::is_pointer<R>::value, int> = 0>
std::add_lvalue_reference_t<std::remove_pointer_t<Ressource>> operator*() const noexcept std::add_lvalue_reference_t<std::remove_pointer_t<Ressource>> operator*() const noexcept
{ {

Loading…
Cancel
Save