Searched refs:CopyOnlyInt (Results 1 – 4 of 4) sorted by relevance
/external/libchrome/base/test/ |
D | copy_only_int.h | 14 class CopyOnlyInt { 16 explicit CopyOnlyInt(int data = 1) : data_(data) {} in data_() 17 CopyOnlyInt(const CopyOnlyInt& other) = default; 18 ~CopyOnlyInt() { data_ = 0; } in ~CopyOnlyInt() 20 friend bool operator==(const CopyOnlyInt& lhs, const CopyOnlyInt& rhs) { 24 friend bool operator!=(const CopyOnlyInt& lhs, const CopyOnlyInt& rhs) { 28 friend bool operator<(const CopyOnlyInt& lhs, const CopyOnlyInt& rhs) { 32 friend bool operator>(const CopyOnlyInt& lhs, const CopyOnlyInt& rhs) { 36 friend bool operator<=(const CopyOnlyInt& lhs, const CopyOnlyInt& rhs) { 40 friend bool operator>=(const CopyOnlyInt& lhs, const CopyOnlyInt& rhs) { [all …]
|
/external/python/pybind11/tests/ |
D | test_copy_move.cpp | 61 class CopyOnlyInt { class 63 CopyOnlyInt() { print_default_created(this); } in CopyOnlyInt() function in CopyOnlyInt 64 CopyOnlyInt(int v) : value{std::move(v)} { print_created(this, value); } in CopyOnlyInt() function in CopyOnlyInt 65 CopyOnlyInt(const CopyOnlyInt &c) { print_copy_created(this, c.value); value = c.value; } in CopyOnlyInt() function in CopyOnlyInt 66 …CopyOnlyInt &operator=(const CopyOnlyInt &c) { print_copy_assigned(this, c.value); value = c.value… in operator =() 67 ~CopyOnlyInt() { print_destroyed(this); } in ~CopyOnlyInt() 85 template <> struct type_caster<CopyOnlyInt> { 87 CopyOnlyInt value; 90 bool load(handle src, bool) { value = CopyOnlyInt(src.cast<int>()); return true; } in load() 91 …static handle cast(const CopyOnlyInt &m, return_value_policy r, handle p) { return pybind11::cast(… in cast() [all …]
|
/external/libchrome/base/containers/ |
D | vector_buffer_unittest.cc | 72 VectorBuffer<CopyOnlyInt> dest(size); in TEST() 74 VectorBuffer<CopyOnlyInt> original(size); in TEST() 76 new (original.begin() + i) CopyOnlyInt(i + 1); in TEST()
|
D | circular_deque_unittest.cc | 81 circular_deque<CopyOnlyInt> first(std::begin(values), std::end(values)); in TEST() 83 circular_deque<CopyOnlyInt> second(first); in TEST()
|