We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2103e69 commit 0a6a213Copy full SHA for 0a6a213
1 file changed
test/data_members.cpp
@@ -18,6 +18,8 @@ typedef test_class<> X;
18
19
typedef test_class<1> Y;
20
21
+double get_fair_value(X const& x) { return x.value(); }
22
+
23
BOOST_PYTHON_MODULE_INIT(data_members_ext)
24
{
25
module("data_members_ext")
@@ -27,6 +29,7 @@ BOOST_PYTHON_MODULE_INIT(data_members_ext)
27
29
.def("value", &X::value)
28
30
.def("set", &X::set)
31
.def_readonly("x", &X::x)
32
+ .add_property("get_fair_value", object(&get_fair_value))
33
)
34
.add(
35
class_<Y>("Y")
0 commit comments