38 #ifndef PMEMOBJ_PEXT_HPP
39 #define PMEMOBJ_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)
76 p<T> &operator++(p<T> &pp)
86 p<T> &operator--(p<T> &pp)
96 p<T> operator++(p<T> &pp,
int)
106 template <
typename T>
107 p<T> operator--(p<T> &pp,
int)
117 template <
typename T,
typename Y>
119 operator+=(p<T> &lhs,
const p<Y> &rhs)
121 lhs.get_rw() += rhs.get_ro();
128 template <
typename T,
typename Y>
130 operator+=(p<T> &lhs,
const Y &rhs)
139 template <
typename T,
typename Y>
141 operator-=(p<T> &lhs,
const p<Y> &rhs)
143 lhs.get_rw() -= rhs.get_ro();
150 template <
typename T,
typename Y>
152 operator-=(p<T> &lhs,
const Y &rhs)
161 template <
typename T,
typename Y>
163 operator*=(p<T> &lhs,
const p<Y> &rhs)
165 lhs.get_rw() *= rhs.get_ro();
172 template <
typename T,
typename Y>
174 operator*=(p<T> &lhs,
const Y &rhs)
183 template <
typename T,
typename Y>
185 operator/=(p<T> &lhs,
const p<Y> &rhs)
187 lhs.get_rw() /= rhs.get_ro();
194 template <
typename T,
typename Y>
196 operator/=(p<T> &lhs,
const Y &rhs)
205 template <
typename T,
typename Y>
207 operator%=(p<T> &lhs,
const p<Y> &rhs)
209 lhs.get_rw() %= rhs.get_ro();
216 template <
typename T,
typename Y>
218 operator%=(p<T> &lhs,
const Y &rhs)
227 template <
typename T,
typename Y>
229 operator&=(p<T> &lhs,
const p<Y> &rhs)
231 lhs.get_rw() &= rhs.get_ro();
238 template <
typename T,
typename Y>
240 operator&=(p<T> &lhs,
const Y &rhs)
249 template <
typename T,
typename Y>
251 operator|=(p<T> &lhs,
const p<Y> &rhs)
253 lhs.get_rw() |= rhs.get_ro();
260 template <
typename T,
typename Y>
262 operator|=(p<T> &lhs,
const Y &rhs)
271 template <
typename T,
typename Y>
273 operator^=(p<T> &lhs,
const p<Y> &rhs)
275 lhs.get_rw() ^= rhs.get_ro();
282 template <
typename T,
typename Y>
284 operator^=(p<T> &lhs,
const Y &rhs)
293 template <
typename T,
typename Y>
295 operator<<=(p<T> &lhs,
const p<Y> &rhs)
297 lhs.get_rw() = lhs.get_ro() << rhs.get_ro();
304 template <
typename T,
typename Y>
306 operator<<=(p<T> &lhs,
const Y &rhs)
308 lhs.get_rw() = lhs.get_ro() << rhs;
315 template <
typename T,
typename Y>
317 operator>>=(p<T> &lhs,
const p<Y> &rhs)
319 lhs.get_rw() = lhs.get_ro() >> rhs.get_ro();
326 template <
typename T,
typename Y>
328 operator>>=(p<T> &lhs,
const Y &rhs)
330 lhs.get_rw() = lhs.get_ro() >> rhs;
341 template <
typename T>
342 struct numeric_limits<nvml::obj::p<T>> :
public numeric_limits<T> {
344 static constexpr
bool is_specialized =
true;
Resides on pmem property template.