Browse Source

No longer specified factory functions deprecated (#88).

main
offa 7 years ago
parent
commit
725b29cf70
4 changed files with 5 additions and 0 deletions
  1. +1
    -0
      include/scope_exit.h
  2. +1
    -0
      include/scope_fail.h
  3. +1
    -0
      include/scope_success.h
  4. +2
    -0
      include/unique_resource.h

+ 1
- 0
include/scope_exit.h View File

@@ -57,6 +57,7 @@ namespace sr


template<class EF>
[[deprecated("Use ctor instead. Will be removed in a future v0.2.x release")]]
scope_exit<std::decay_t<EF>> make_scope_exit(EF&& exitFunction)
{
return scope_exit<std::decay_t<EF>>{std::forward<EF>(exitFunction)};

+ 1
- 0
include/scope_fail.h View File

@@ -67,6 +67,7 @@ namespace sr


template<class EF>
[[deprecated("Use ctor instead. Will be removed in a future v0.2.x release")]]
scope_fail<std::decay_t<EF>> make_scope_fail(EF&& exitFunction)
{
return scope_fail<std::decay_t<EF>>{std::forward<EF>(exitFunction)};

+ 1
- 0
include/scope_success.h View File

@@ -60,6 +60,7 @@ namespace sr


template<class EF>
[[deprecated("Use ctor instead. Will be removed in a future v0.2.x release")]]
scope_success<std::decay_t<EF>> make_scope_success(EF&& exitFunction)
{
return scope_success<std::decay_t<EF>>{std::forward<EF>(exitFunction)};

+ 2
- 0
include/unique_resource.h View File

@@ -208,6 +208,7 @@ namespace sr


template<class R, class D>
[[deprecated("Use ctor instead. Will be removed in a future v0.2.x release")]]
unique_resource<std::decay_t<R>, std::decay_t<D>> make_unique_resource(R&& r, D&& d)
noexcept(std::is_nothrow_constructible_v<std::decay_t<R>, R>
&& std::is_nothrow_constructible_v<std::decay_t<D>, D>)
@@ -216,6 +217,7 @@ namespace sr
}

template<class R, class D>
[[deprecated("Use ctor instead. Will be removed in a future v0.2.x release")]]
unique_resource<R&, std::decay_t<D>> make_unique_resource(std::reference_wrapper<R> r, D d)
noexcept(std::is_nothrow_constructible_v<std::decay_t<D>, D>)
{

Loading…
Cancel
Save