Browse Source

allow non-const access to wrapped type. Can be dangerous! USE WITH CAUTION!

master
roker 9 months ago
parent
commit
d965b3115b
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/wrapper.hh

+ 7
- 1
src/wrapper.hh View File

@ -97,10 +97,16 @@ public:
}
const T* operator->() const { return value; }
const T* get() const { return value; }
// dangerous!
T* operator->() { return value; }
T* get() { return value;}
T* move_out() { T* r = value; value=nullptr; return r;}
// only implemented for the datatypes where necessay.
// other implementations can follow if necessary.
T* copy_out();
protected:


Loading…
Cancel
Save