Browse Source

Missing reset() method added.

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

+ 6
- 0
include/unique_resource.h View File

@@ -23,6 +23,7 @@
#include "scope_exit.h"
#include <utility>
#include <type_traits>
#include <functional>

namespace sr
{
@@ -120,6 +121,11 @@ namespace sr
return m_value.get();
}

void reset(T& newValue) noexcept
{
m_value = std::ref(newValue);
}


private:


Loading…
Cancel
Save