add last backwards-compatible version
This commit is contained in:
14
pfc/other.h
14
pfc/other.h
@@ -12,17 +12,6 @@ namespace pfc {
|
||||
~vartoggle_t() {var = oldval;}
|
||||
};
|
||||
|
||||
template<class T>
|
||||
class vartoggle_volatile_t {
|
||||
T oldval; volatile T & var;
|
||||
public:
|
||||
vartoggle_volatile_t(volatile T & p_var,const T & val) : var(p_var) {
|
||||
oldval = var;
|
||||
var = val;
|
||||
}
|
||||
~vartoggle_volatile_t() {var = oldval;}
|
||||
};
|
||||
|
||||
typedef vartoggle_t<bool> booltoggle;
|
||||
};
|
||||
|
||||
@@ -122,9 +111,6 @@ namespace pfc {
|
||||
|
||||
//deprecated
|
||||
inline void set(T * p_ptr) {attach(p_ptr);}
|
||||
|
||||
ptrholder_t(t_self&& other) { m_ptr = other.detach(); }
|
||||
const t_self& operator=(t_self&& other) { attach(other.detach()); return this; }
|
||||
private:
|
||||
ptrholder_t(const t_self &) {throw pfc::exception_not_implemented();}
|
||||
const t_self & operator=(const t_self & ) {throw pfc::exception_not_implemented();}
|
||||
|
||||
Reference in New Issue
Block a user