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
347e6eaf
Commit
347e6eaf
authored
Feb 23, 2016
by
Wenzel Jakob
Browse files
allow a broader set of types in STL containers
parent
82ba3300
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
include/pybind11/stl.h
include/pybind11/stl.h
+5
-5
No files found.
include/pybind11/stl.h
View file @
347e6eaf
...
@@ -27,7 +27,7 @@ NAMESPACE_BEGIN(detail)
...
@@ -27,7 +27,7 @@ NAMESPACE_BEGIN(detail)
template
<
typename
Type
,
typename
Key
>
struct
set_caster
{
template
<
typename
Type
,
typename
Key
>
struct
set_caster
{
typedef
Type
type
;
typedef
Type
type
;
typedef
type_caster
<
Key
>
key_conv
;
typedef
type_caster
<
typename
intrinsic_type
<
Key
>::
type
>
key_conv
;
bool
load
(
handle
src
,
bool
convert
)
{
bool
load
(
handle
src
,
bool
convert
)
{
pybind11
::
set
s
(
src
,
true
);
pybind11
::
set
s
(
src
,
true
);
...
@@ -58,8 +58,8 @@ template <typename Type, typename Key> struct set_caster {
...
@@ -58,8 +58,8 @@ template <typename Type, typename Key> struct set_caster {
template
<
typename
Type
,
typename
Key
,
typename
Value
>
struct
map_caster
{
template
<
typename
Type
,
typename
Key
,
typename
Value
>
struct
map_caster
{
typedef
Type
type
;
typedef
Type
type
;
typedef
type_caster
<
Key
>
key_conv
;
typedef
type_caster
<
typename
intrinsic_type
<
Key
>::
type
>
key_conv
;
typedef
type_caster
<
Valu
e
>
value_conv
;
typedef
type_caster
<
typename
intrinsic_type
<
Value
>::
typ
e
>
value_conv
;
bool
load
(
handle
src
,
bool
convert
)
{
bool
load
(
handle
src
,
bool
convert
)
{
dict
d
(
src
,
true
);
dict
d
(
src
,
true
);
...
@@ -94,7 +94,7 @@ template <typename Type, typename Key, typename Value> struct map_caster {
...
@@ -94,7 +94,7 @@ template <typename Type, typename Key, typename Value> struct map_caster {
template
<
typename
Type
,
typename
Value
>
struct
list_caster
{
template
<
typename
Type
,
typename
Value
>
struct
list_caster
{
typedef
Type
type
;
typedef
Type
type
;
typedef
type_caster
<
Valu
e
>
value_conv
;
typedef
type_caster
<
typename
intrinsic_type
<
Value
>::
typ
e
>
value_conv
;
bool
load
(
handle
src
,
bool
convert
)
{
bool
load
(
handle
src
,
bool
convert
)
{
list
l
(
src
,
true
);
list
l
(
src
,
true
);
...
@@ -139,7 +139,7 @@ template <typename Type, typename Alloc> struct type_caster<std::list<Type, Allo
...
@@ -139,7 +139,7 @@ template <typename Type, typename Alloc> struct type_caster<std::list<Type, Allo
template
<
typename
Type
,
size_t
Size
>
struct
type_caster
<
std
::
array
<
Type
,
Size
>>
{
template
<
typename
Type
,
size_t
Size
>
struct
type_caster
<
std
::
array
<
Type
,
Size
>>
{
typedef
std
::
array
<
Type
,
Size
>
array_type
;
typedef
std
::
array
<
Type
,
Size
>
array_type
;
typedef
type_caster
<
T
ype
>
value_conv
;
typedef
type_caster
<
typename
intrinsic_type
<
Type
>::
t
ype
>
value_conv
;
bool
load
(
handle
src
,
bool
convert
)
{
bool
load
(
handle
src
,
bool
convert
)
{
list
l
(
src
,
true
);
list
l
(
src
,
true
);
...
...
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