comparison osx/include/kj/memory.h @ 62:0994c39f1e94

Cap'n Proto v0.6 + build for OSX
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 22 May 2017 10:01:37 +0100
parents 3ab5a40c4e3b
children
comparison
equal deleted inserted replaced
61:d101c4099725 62:0994c39f1e94
237 inline Maybe(Own<T>&& t) noexcept: ptr(kj::mv(t)) {} 237 inline Maybe(Own<T>&& t) noexcept: ptr(kj::mv(t)) {}
238 inline Maybe(Maybe&& other) noexcept: ptr(kj::mv(other.ptr)) {} 238 inline Maybe(Maybe&& other) noexcept: ptr(kj::mv(other.ptr)) {}
239 239
240 template <typename U> 240 template <typename U>
241 inline Maybe(Maybe<Own<U>>&& other): ptr(mv(other.ptr)) {} 241 inline Maybe(Maybe<Own<U>>&& other): ptr(mv(other.ptr)) {}
242 template <typename U>
243 inline Maybe(Own<U>&& other): ptr(mv(other)) {}
242 244
243 inline Maybe(decltype(nullptr)) noexcept: ptr(nullptr) {} 245 inline Maybe(decltype(nullptr)) noexcept: ptr(nullptr) {}
244 246
245 inline operator Maybe<T&>() { return ptr.get(); } 247 inline operator Maybe<T&>() { return ptr.get(); }
246 inline operator Maybe<const T&>() const { return ptr.get(); } 248 inline operator Maybe<const T&>() const { return ptr.get(); }