Home
last modified time | relevance | path

Searched refs:CopyablePtr (Results 1 – 2 of 2) sorted by relevance

/external/perfetto/include/perfetto/protozero/
Dcopyable_ptr.h39 class CopyablePtr {
41 CopyablePtr() : ptr_(new T()) {} in CopyablePtr() function
42 ~CopyablePtr() = default;
45 CopyablePtr(const CopyablePtr& other) : ptr_(new T(*other.ptr_)) {} in CopyablePtr() function
46 CopyablePtr& operator=(const CopyablePtr& other) {
52 CopyablePtr(CopyablePtr&& other) noexcept : ptr_(std::move(other.ptr_)) { in CopyablePtr() function
56 CopyablePtr& operator=(CopyablePtr&& other) {
71 friend bool operator==(const CopyablePtr& lhs, const CopyablePtr& rhs) {
75 friend bool operator!=(const CopyablePtr& lhs, const CopyablePtr& rhs) {
/external/perfetto/src/protozero/
Dcopyable_ptr_unittest.cc43 CopyablePtr<X> p1; in TEST()
48 CopyablePtr<X> p2(p1); in TEST()
58 CopyablePtr<X> p3; in TEST()
74 CopyablePtr<X> p1; in TEST()
77 CopyablePtr<X> p2(std::move(p1)); in TEST()
83 CopyablePtr<X> p3; in TEST()
93 CopyablePtr<X> p1; in TEST()
96 CopyablePtr<X> p2; in TEST()
99 CopyablePtr<X> p3; in TEST()