mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-23 13:45:10 +00:00
d28c3a5da7
* Transferred net diff from PR #3581, as-is. * Automatic `pre-commit run --all-files` fixes. NO manual changes. * Removing trailing `//` (originally added to manipulate clang-format), as suggested by @charlesbeattie back in Jan/Feb under PR #3581. * Renaming `xetter_cpp_function` to `property_cpp_function` as suggested by @rainwoodman * Fully explain the terse variable naming scheme in test_class_sh_property (as suggested by @rainwoodman) * Also use parametrize for readonly, readwrite (as suggested by @rainwoodman) * Apply change suggested by @skylion007 (with clang-format).
15 lines
650 B
Plaintext
15 lines
650 B
Plaintext
assert m.atyp_valu().get_mtxt() == "Valu"
|
|
atyp_valu rtrn_valu() { atyp_valu obj{"Valu"}; return obj; }
|
|
explicit indestructible_int(int v) : valu{v} {}
|
|
explicit movable_int(int v) : valu{v} {}
|
|
int valu;
|
|
(m.pass_valu, "Valu", "pass_valu:Valu(_MvCtor)*_CpCtor"),
|
|
other.valu = 91;
|
|
REQUIRE(hld.as_raw_ptr_unowned<zombie>()->valu == 19);
|
|
REQUIRE(orig.valu == 91);
|
|
REQUIRE(othr.valu == 19);
|
|
valu = other.valu;
|
|
with pytest.raises(ValueError) as excinfo:
|
|
with pytest.raises(ValueError) as exc_info:
|
|
// valu(e), ref(erence), ptr or p (pointer), r = rvalue, m = mutable, c = const,
|