38 #ifndef LIBPMEMOBJ_CPP_PEXT_HPP
39 #define LIBPMEMOBJ_CPP_PEXT_HPP
56 operator<<(std::ostream &os, const p<T> &pp)
58 return os << pp.get_ro();
66 operator>>(std::istream &is, p<T> &pp)
99 operator++(p<T> &pp,
int)
109 template <
typename T>
111 operator--(p<T> &pp,
int)
121 template <
typename T,
typename Y>
123 operator+=(p<T> &lhs,
const p<Y> &rhs)
125 lhs.get_rw() += rhs.get_ro();
132 template <
typename T,
typename Y>
134 operator+=(p<T> &lhs,
const Y &rhs)
143 template <
typename T,
typename Y>
145 operator-=(p<T> &lhs,
const p<Y> &rhs)
147 lhs.get_rw() -= rhs.get_ro();
154 template <
typename T,
typename Y>
156 operator-=(p<T> &lhs,
const Y &rhs)
165 template <
typename T,
typename Y>
167 operator*=(p<T> &lhs,
const p<Y> &rhs)
169 lhs.get_rw() *= rhs.get_ro();
176 template <
typename T,
typename Y>
178 operator*=(p<T> &lhs,
const Y &rhs)
187 template <
typename T,
typename Y>
189 operator/=(p<T> &lhs,
const p<Y> &rhs)
191 lhs.get_rw() /= rhs.get_ro();
198 template <
typename T,
typename Y>
200 operator/=(p<T> &lhs,
const Y &rhs)
209 template <
typename T,
typename Y>
211 operator%=(p<T> &lhs,
const p<Y> &rhs)
213 lhs.get_rw() %= rhs.get_ro();
220 template <
typename T,
typename Y>
222 operator%=(p<T> &lhs,
const Y &rhs)
231 template <
typename T,
typename Y>
233 operator&=(p<T> &lhs,
const p<Y> &rhs)
235 lhs.get_rw() &= rhs.get_ro();
242 template <
typename T,
typename Y>
244 operator&=(p<T> &lhs,
const Y &rhs)
253 template <
typename T,
typename Y>
255 operator|=(p<T> &lhs,
const p<Y> &rhs)
257 lhs.get_rw() |= rhs.get_ro();
264 template <
typename T,
typename Y>
266 operator|=(p<T> &lhs,
const Y &rhs)
275 template <
typename T,
typename Y>
277 operator^=(p<T> &lhs,
const p<Y> &rhs)
279 lhs.get_rw() ^= rhs.get_ro();
286 template <
typename T,
typename Y>
288 operator^=(p<T> &lhs,
const Y &rhs)
297 template <
typename T,
typename Y>
299 operator<<=(p<T> &lhs,
const p<Y> &rhs)
301 lhs.get_rw() = lhs.get_ro() << rhs.get_ro();
308 template <
typename T,
typename Y>
310 operator<<=(p<T> &lhs,
const Y &rhs)
312 lhs.get_rw() = lhs.get_ro() << rhs;
319 template <
typename T,
typename Y>
321 operator>>=(p<T> &lhs,
const p<Y> &rhs)
323 lhs.get_rw() = lhs.get_ro() >> rhs.get_ro();
330 template <
typename T,
typename Y>
332 operator>>=(p<T> &lhs,
const Y &rhs)
334 lhs.get_rw() = lhs.get_ro() >> rhs;
345 template <
typename T>
346 struct numeric_limits<pmem::obj::p<T>> :
public numeric_limits<T> {
348 static constexpr
bool is_specialized =
true;
Resides on pmem property template.