Pārlūkot izejas kodu

Decays removed from SFINAE (fixes #22).

main
offa pirms 8 gadiem
vecāks
revīzija
6bced82d22
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +2
    -2
      include/unique_resource.h

+ 2
- 2
include/unique_resource.h Parādīt failu

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
{ {

Notiek ielāde…
Atcelt
Saglabāt