浏览代码

Decays removed from SFINAE (fixes #22).

main
offa 8 年前
父节点
当前提交
6bced82d22
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      include/unique_resource.h

+ 2
- 2
include/unique_resource.h 查看文件

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

正在加载...
取消
保存