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

Class UserType

tests/pybind11_tests.h:28–38  ·  view source on GitHub ↗

A user-defined type which is exported and can be used by any test

Source from the content-addressed store, hash-verified

26
27/// A user-defined type which is exported and can be used by any test
28class UserType {
29public:
30 UserType() = default;
31 explicit UserType(int i) : i(i) {}
32
33 int value() const { return i; }
34 void set(int set) { i = set; }
35
36private:
37 int i = -1;
38};
39
40/// Like UserType, but increments `value` on copy for quick reference vs. copy tests
41class IncType : public UserType {

Callers 7

test_pointersFunction · 0.90
test_none_deferredFunction · 0.90
test_reference_wrapperFunction · 0.90
test_obj_class_nameFunction · 0.90
TEST_SUBMODULEFunction · 0.85

Calls

no outgoing calls

Tested by 7

test_pointersFunction · 0.72
test_none_deferredFunction · 0.72
test_reference_wrapperFunction · 0.72
test_obj_class_nameFunction · 0.72
TEST_SUBMODULEFunction · 0.68