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

#include "scope_exit.h" #include "scope_exit.h"
#include <utility> #include <utility>
#include <type_traits> #include <type_traits>
#include <functional>


namespace sr namespace sr
{ {
return m_value.get(); return m_value.get();
} }


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



private: private:



Loading…
Cancel
Save