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
d6fdafb2
Commit
d6fdafb2
authored
Mar 26, 2017
by
Jason Rhinelander
Browse files
Fix unchecked type caster template Dim type
parent
5b503764
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/pybind11/numpy.h
include/pybind11/numpy.h
+2
-2
No files found.
include/pybind11/numpy.h
View file @
d6fdafb2
...
@@ -340,11 +340,11 @@ public:
...
@@ -340,11 +340,11 @@ public:
template
<
typename
...
Ix
>
T
*
mutable_data
(
Ix
...
ix
)
{
return
&
operator
()(
size_t
(
ix
)...);
}
template
<
typename
...
Ix
>
T
*
mutable_data
(
Ix
...
ix
)
{
return
&
operator
()(
size_t
(
ix
)...);
}
};
};
template
<
typename
T
,
size_t
Dim
>
template
<
typename
T
,
s
size_t
Dim
>
struct
type_caster
<
unchecked_reference
<
T
,
Dim
>>
{
struct
type_caster
<
unchecked_reference
<
T
,
Dim
>>
{
static_assert
(
Dim
==
0
&&
Dim
>
0
/* always fail */
,
"unchecked array proxy object is not castable"
);
static_assert
(
Dim
==
0
&&
Dim
>
0
/* always fail */
,
"unchecked array proxy object is not castable"
);
};
};
template
<
typename
T
,
size_t
Dim
>
template
<
typename
T
,
s
size_t
Dim
>
struct
type_caster
<
unchecked_mutable_reference
<
T
,
Dim
>>
:
type_caster
<
unchecked_reference
<
T
,
Dim
>>
{};
struct
type_caster
<
unchecked_mutable_reference
<
T
,
Dim
>>
:
type_caster
<
unchecked_reference
<
T
,
Dim
>>
{};
NAMESPACE_END
(
detail
)
NAMESPACE_END
(
detail
)
...
...
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