@@ -1174,14 +1174,6 @@ class class_ : public detail::generic_type {
1174
1174
return *this ;
1175
1175
}
1176
1176
1177
- template <typename C, typename D, typename ... Extra>
1178
- class_ &def_writeonly (const char *name, D C::*pm, const Extra& ...extra) {
1179
- static_assert (std::is_base_of<C, type>::value, " def_writeonly() requires a class member (or base class member)" );
1180
- cpp_function fset ([pm](type &c, const D &value) { c.*pm = value; }, is_method (*this ));
1181
- def_property_writeonly (name, fset, extra...);
1182
- return *this ;
1183
- }
1184
-
1185
1177
template <typename D, typename ... Extra>
1186
1178
class_ &def_readwrite_static (const char *name, D *pm, const Extra& ...extra) {
1187
1179
cpp_function fget ([pm](object) -> const D &{ return *pm; }, scope (*this )),
@@ -1197,58 +1189,31 @@ class class_ : public detail::generic_type {
1197
1189
return *this ;
1198
1190
}
1199
1191
1200
- template <typename D, typename ... Extra>
1201
- class_ &def_writeonly_static (const char *name, D *pm, const Extra& ...extra) {
1202
- cpp_function fset ([pm](object, const D &value) { *pm = value; }, scope (*this ));
1203
- def_property_writeonly_static (name, fset, extra...);
1204
- return *this ;
1205
- }
1206
-
1207
1192
// / Uses return_value_policy::reference_internal by default
1208
1193
template <typename Getter, typename ... Extra>
1209
1194
class_ &def_property_readonly (const char *name, const Getter &fget, const Extra& ...extra) {
1210
1195
return def_property_readonly (name, cpp_function (method_adaptor<type>(fget)),
1211
1196
return_value_policy::reference_internal, extra...);
1212
1197
}
1213
1198
1214
- template <typename Setter, typename ... Extra>
1215
- class_ &def_property_writeonly (const char *name, const Setter &fset, const Extra& ...extra) {
1216
- return def_property_writeonly (name, cpp_function (method_adaptor<type>(fset)),extra...);
1217
- }
1218
-
1219
1199
// / Uses cpp_function's return_value_policy by default
1220
1200
template <typename ... Extra>
1221
1201
class_ &def_property_readonly (const char *name, const cpp_function &fget, const Extra& ...extra) {
1222
1202
return def_property (name, fget, cpp_function (), extra...);
1223
1203
}
1224
1204
1225
- template <typename ... Extra>
1226
- class_ &def_property_writeonly (const char *name, const cpp_function &fset, const Extra& ...extra) {
1227
- return def_property (name, cpp_function (), fset, extra...);
1228
- }
1229
-
1230
1205
// / Uses return_value_policy::reference by default
1231
1206
template <typename Getter, typename ... Extra>
1232
1207
class_ &def_property_readonly_static (const char *name, const Getter &fget, const Extra& ...extra) {
1233
1208
return def_property_readonly_static (name, cpp_function (fget), return_value_policy::reference, extra...);
1234
1209
}
1235
1210
1236
- template <typename Setter, typename ... Extra>
1237
- class_ &def_property_writeonly_static (const char *name, const Setter &fset, const Extra& ...extra) {
1238
- return def_property_writeonly_static (name, cpp_function (fset), extra...);
1239
- }
1240
-
1241
1211
// / Uses cpp_function's return_value_policy by default
1242
1212
template <typename ... Extra>
1243
1213
class_ &def_property_readonly_static (const char *name, const cpp_function &fget, const Extra& ...extra) {
1244
1214
return def_property_static (name, fget, cpp_function (), extra...);
1245
1215
}
1246
1216
1247
- template <typename ... Extra>
1248
- class_ &def_property_writeonly_static (const char *name, const cpp_function &fset, const Extra& ...extra) {
1249
- return def_property_static (name, cpp_function (), fset, extra...);
1250
- }
1251
-
1252
1217
// / Uses return_value_policy::reference_internal by default
1253
1218
template <typename Getter, typename Setter, typename ... Extra>
1254
1219
class_ &def_property (const char *name, const Getter &fget, const Setter &fset, const Extra& ...extra) {
0 commit comments