38 #ifndef PMEMOBJ_PEXT_HPP
39 #define PMEMOBJ_PEXT_HPP
55 operator<<(std::ostream &os, const p<T> &pp)
57 return os << pp.get_ro();
65 operator>>(std::istream &is, p<T> &pp)
75 p<T> &operator++(p<T> &pp)
85 p<T> &operator--(p<T> &pp)
95 p<T> operator++(p<T> &pp,
int)
105 template <
typename T>
106 p<T> operator--(p<T> &pp,
int)
116 template <
typename T,
typename Y>
118 operator+=(p<T> &lhs,
const p<Y> &rhs)
120 lhs.get_rw() += rhs.get_ro();
127 template <
typename T,
typename Y>
129 operator+=(p<T> &lhs,
const Y &rhs)
138 template <
typename T,
typename Y>
140 operator-=(p<T> &lhs,
const p<Y> &rhs)
142 lhs.get_rw() -= rhs.get_ro();
149 template <
typename T,
typename Y>
151 operator-=(p<T> &lhs,
const Y &rhs)
160 template <
typename T,
typename Y>
162 operator*=(p<T> &lhs,
const p<Y> &rhs)
164 lhs.get_rw() *= rhs.get_ro();
171 template <
typename T,
typename Y>
173 operator*=(p<T> &lhs,
const Y &rhs)
182 template <
typename T,
typename Y>
184 operator/=(p<T> &lhs,
const p<Y> &rhs)
186 lhs.get_rw() /= rhs.get_ro();
193 template <
typename T,
typename Y>
195 operator/=(p<T> &lhs,
const Y &rhs)
204 template <
typename T,
typename Y>
206 operator%=(p<T> &lhs,
const p<Y> &rhs)
208 lhs.get_rw() %= rhs.get_ro();
215 template <
typename T,
typename Y>
217 operator%=(p<T> &lhs,
const Y &rhs)
226 template <
typename T,
typename Y>
228 operator&=(p<T> &lhs,
const p<Y> &rhs)
230 lhs.get_rw() &= rhs.get_ro();
237 template <
typename T,
typename Y>
239 operator&=(p<T> &lhs,
const Y &rhs)
248 template <
typename T,
typename Y>
250 operator|=(p<T> &lhs,
const p<Y> &rhs)
252 lhs.get_rw() |= rhs.get_ro();
259 template <
typename T,
typename Y>
261 operator|=(p<T> &lhs,
const Y &rhs)
270 template <
typename T,
typename Y>
272 operator^=(p<T> &lhs,
const p<Y> &rhs)
274 lhs.get_rw() ^= rhs.get_ro();
281 template <
typename T,
typename Y>
283 operator^=(p<T> &lhs,
const Y &rhs)
292 template <
typename T,
typename Y>
294 operator<<=(p<T> &lhs,
const p<Y> &rhs)
296 lhs.get_rw() = lhs.get_ro() << rhs.get_ro();
303 template <
typename T,
typename Y>
305 operator<<=(p<T> &lhs,
const Y &rhs)
307 lhs.get_rw() = lhs.get_ro() << rhs;
314 template <
typename T,
typename Y>
316 operator>>=(p<T> &lhs,
const p<Y> &rhs)
318 lhs.get_rw() = lhs.get_ro() >> rhs.get_ro();
325 template <
typename T,
typename Y>
327 operator>>=(p<T> &lhs,
const Y &rhs)
329 lhs.get_rw() = lhs.get_ro() >> rhs;
Resides on pmem property template.