소스 검색

Missing reset() method added.

main
offa 8 년 전
부모
커밋
6558c27cc5
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. +6
    -0
      include/unique_resource.h

+ 6
- 0
include/unique_resource.h 파일 보기

#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…
취소
저장