MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / unique_ptr

Class unique_ptr

native/thirdpart/flatbuffers/stl_emulation.h:221–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219 // namespace we have a completely independent implementation (see below)
220 // for C++98 STL implementations.
221 template <class T> class unique_ptr : public std::unique_ptr<T> {
222 public:
223 unique_ptr() {}
224 explicit unique_ptr(T* p) : std::unique_ptr<T>(p) {}
225 unique_ptr(std::unique_ptr<T>&& u) { *this = std::move(u); }
226 unique_ptr(unique_ptr&& u) { *this = std::move(u); }
227 unique_ptr& operator=(std::unique_ptr<T>&& u) {
228 std::unique_ptr<T>::reset(u.release());
229 return *this;
230 }
231 unique_ptr& operator=(unique_ptr&& u) {
232 std::unique_ptr<T>::reset(u.release());
233 return *this;
234 }
235 unique_ptr& operator=(T* p) {
236 return std::unique_ptr<T>::operator=(p);
237 }
238 };
239 #endif // defined(FLATBUFFERS_TEMPLATES_ALIASES)
240#else
241 // Very limited implementation of unique_ptr.

Callers

nothing calls this directly

Calls 2

resetFunction · 0.85
releaseMethod · 0.80

Tested by

no test coverage detected