MCPcopy Create free account
hub / github.com/pybind/pybind11 / CopyOnlyInt

Class CopyOnlyInt

tests/test_copy_move.cpp:92–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 int value;
91};
92class CopyOnlyInt {
93public:
94 CopyOnlyInt() { print_default_created(this); }
95 explicit CopyOnlyInt(int v) : value{v} { print_created(this, value); }
96 CopyOnlyInt(const CopyOnlyInt &c) {
97 print_copy_created(this, c.value);
98 // NOLINTNEXTLINE(cppcoreguidelines-prefer-member-initializer)
99 value = c.value;
100 }
101 CopyOnlyInt &operator=(const CopyOnlyInt &c) {
102 print_copy_assigned(this, c.value);
103 value = c.value;
104 return *this;
105 }
106 ~CopyOnlyInt() { print_destroyed(this); }
107
108 int value;
109};
110PYBIND11_NAMESPACE_BEGIN(pybind11)
111PYBIND11_NAMESPACE_BEGIN(detail)
112template <>

Callers 1

loadMethod · 0.85

Calls 1

print_copy_assignedFunction · 0.85

Tested by 1

loadMethod · 0.68