Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
67b3daee
Commit
67b3daee
authored
Aug 15, 2016
by
Ivan Smirnov
Browse files
Always decay type param of npy_format_descriptor
parent
edbd4cb0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
include/pybind11/numpy.h
include/pybind11/numpy.h
+4
-4
No files found.
include/pybind11/numpy.h
View file @
67b3daee
...
...
@@ -29,8 +29,6 @@ NAMESPACE_BEGIN(pybind11)
namespace
detail
{
template
<
typename
type
,
typename
SFINAE
=
void
>
struct
npy_format_descriptor
{
};
template
<
typename
type
>
struct
is_pod_struct
;
template
<
typename
T
>
using
decay_cv_ref
=
typename
std
::
remove_cv
<
typename
std
::
remove_reference
<
T
>::
type
>::
type
;
struct
npy_api
{
enum
constants
{
...
...
@@ -148,7 +146,7 @@ public:
}
template
<
typename
T
>
static
dtype
of
()
{
return
detail
::
npy_format_descriptor
<
T
>::
dtype
();
return
detail
::
npy_format_descriptor
<
typename
std
::
remove_cv
<
T
>::
type
>::
dtype
();
}
size_t
itemsize
()
const
{
...
...
@@ -306,7 +304,9 @@ public:
template
<
typename
T
>
struct
format_descriptor
<
T
,
typename
std
::
enable_if
<
detail
::
is_pod_struct
<
T
>::
value
>::
type
>
{
static
std
::
string
format
()
{
return
detail
::
npy_format_descriptor
<
T
>::
format
();
}
static
std
::
string
format
()
{
return
detail
::
npy_format_descriptor
<
typename
std
::
remove_cv
<
T
>::
type
>::
format
();
}
};
template
<
size_t
N
>
struct
format_descriptor
<
char
[
N
]
>
{
...
...
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