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

Method NonCopyableInt

tests/test_sequences_and_iterators.cpp:69–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67class NonCopyableInt {
68public:
69 explicit NonCopyableInt(int value) : value_(value) {}
70 NonCopyableInt(const NonCopyableInt &) = delete;
71 NonCopyableInt(NonCopyableInt &&other) noexcept : value_(other.value_) {
72 other.value_ = -1; // detect when an unwanted move occurs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected