Browse Source

Default type of template parameter 'S' updated to decay_t<R> (fixes #132).

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

+ 1
- 1
include/unique_resource.h View File

unique_resource(R, D) -> unique_resource<R, D>; unique_resource(R, D) -> unique_resource<R, D>;




template<class R, class D, class S = R>
template<class R, class D, class S = std::decay_t<R>>
unique_resource<std::decay_t<R>, std::decay_t<D>> make_unique_resource_checked(R&& r, const S& invalid, D&& d) unique_resource<std::decay_t<R>, std::decay_t<D>> make_unique_resource_checked(R&& r, const S& invalid, D&& d)
noexcept(std::is_nothrow_constructible_v<std::decay_t<R>, R> noexcept(std::is_nothrow_constructible_v<std::decay_t<R>, R>
&& std::is_nothrow_constructible_v<std::decay_t<D>, D>) && std::is_nothrow_constructible_v<std::decay_t<D>, D>)

Loading…
Cancel
Save