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

Class IncType

tests/pybind11_tests.h:41–49  ·  view source on GitHub ↗

Like UserType, but increments `value` on copy for quick reference vs. copy tests

Source from the content-addressed store, hash-verified

39
40/// Like UserType, but increments `value` on copy for quick reference vs. copy tests
41class IncType : public UserType {
42public:
43 using UserType::UserType;
44 IncType() = default;
45 IncType(const IncType &other) : IncType(other.value() + 1) {}
46 IncType(IncType &&) = delete;
47 IncType &operator=(const IncType &) = delete;
48 IncType &operator=(IncType &&) = delete;
49};
50
51/// A simple union for basic testing
52union IntFloat {

Callers 1

test_reference_wrapperFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_reference_wrapperFunction · 0.72