Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
77ef03d5
Commit
77ef03d5
authored
Jun 11, 2019
by
Jeff VanOss
Committed by
Wenzel Jakob
Jun 11, 2019
Browse files
compile time check that properties have no py:arg values (#1524)
parent
000aabb2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
include/pybind11/pybind11.h
include/pybind11/pybind11.h
+2
-0
No files found.
include/pybind11/pybind11.h
View file @
77ef03d5
...
@@ -1266,6 +1266,8 @@ public:
...
@@ -1266,6 +1266,8 @@ public:
/// Uses cpp_function's return_value_policy by default
/// Uses cpp_function's return_value_policy by default
template
<
typename
...
Extra
>
template
<
typename
...
Extra
>
class_
&
def_property_static
(
const
char
*
name
,
const
cpp_function
&
fget
,
const
cpp_function
&
fset
,
const
Extra
&
...
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_fget
=
get_function_record
(
fget
),
rec_fset
=
get_function_record
(
fset
);
auto
*
rec_active
=
rec_fget
;
auto
*
rec_active
=
rec_fget
;
if
(
rec_fget
)
{
if
(
rec_fget
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment