Procházet zdrojové kódy

Missing reset() method added.

main
offa před 7 roky
rodič
revize
6558c27cc5
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. +6
    -0
      include/unique_resource.h

+ 6
- 0
include/unique_resource.h Zobrazit soubor

@@ -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:


Načítá se…
Zrušit
Uložit