mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
compile time check that properties have no py:arg values (#1524)
This commit is contained in:
parent
000aabb2a7
commit
77ef03d5b1
@ -1266,6 +1266,8 @@ public:
|
||||
/// Uses cpp_function's return_value_policy by default
|
||||
template <typename... Extra>
|
||||
class_ &def_property_static(const char *name, const cpp_function &fget, const cpp_function &fset, const Extra& ...extra) {
|
||||
static_assert( 0 == detail::constexpr_sum(std::is_base_of<arg, Extra>::value...),
|
||||
"Argument annotations are not allowed for properties");
|
||||
auto rec_fget = get_function_record(fget), rec_fset = get_function_record(fset);
|
||||
auto *rec_active = rec_fget;
|
||||
if (rec_fget) {
|
||||
|
Loading…
Reference in New Issue
Block a user