Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
12cf5438
Commit
12cf5438
authored
Mar 26, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address compilation issue in MSVC
parent
048373c1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
include/pybind11/cast.h
+3
-2
include/pybind11/common.h
+4
-4
No files found.
include/pybind11/cast.h
View file @
12cf5438
...
@@ -507,8 +507,9 @@ protected:
...
@@ -507,8 +507,9 @@ protected:
template
<
typename
T
>
/* Used to select the right casting operator in the two functions below */
template
<
typename
T
>
/* Used to select the right casting operator in the two functions below */
using
cast_target
=
using
cast_target
=
typename
std
::
conditional
<
typename
std
::
conditional
<
is_tuple
<
typename
intrinsic_type
<
T
>::
type
>::
value
,
/* special case: tuple/pair -> pass by value */
is_specialization_of
<
typename
intrinsic_type
<
T
>::
type
,
std
::
tuple
>::
value
||
typename
intrinsic_type
<
T
>::
type
,
is_specialization_of
<
typename
intrinsic_type
<
T
>::
type
,
std
::
pair
>::
value
,
typename
intrinsic_type
<
T
>::
type
,
/* special case: tuple/pair -> pass by value */
typename
std
::
conditional
<
typename
std
::
conditional
<
std
::
is_pointer
<
T
>::
value
,
std
::
is_pointer
<
T
>::
value
,
typename
std
::
add_pointer
<
typename
intrinsic_type
<
T
>::
type
>::
type
,
/* pass using pointer */
typename
std
::
add_pointer
<
typename
intrinsic_type
<
T
>::
type
>::
type
,
/* pass using pointer */
...
...
include/pybind11/common.h
View file @
12cf5438
...
@@ -257,10 +257,10 @@ template <typename T> struct is_copy_constructible {
...
@@ -257,10 +257,10 @@ template <typename T> struct is_copy_constructible {
static
const
bool
value
=
std
::
is_same
<
std
::
true_type
,
decltype
(
test
<
T
>
(
nullptr
))
>::
value
;
static
const
bool
value
=
std
::
is_same
<
std
::
true_type
,
decltype
(
test
<
T
>
(
nullptr
))
>::
value
;
};
};
/// Helper type determine if another type is a variant of a pair/tuple
template
<
typename
T
,
template
<
typename
...
>
class
Template
>
template
<
typename
T
>
struct
is_tuple
:
std
::
false_type
{
};
struct
is_specialization_of
:
std
::
false_type
{
};
template
<
t
ypename
...
Args
>
struct
is_tuple
<
std
::
tuple
<
Args
...
>>
:
std
::
true_type
{
};
template
<
t
emplate
<
typename
...
>
class
Template
,
typename
...
Args
>
template
<
typename
...
Args
>
struct
is_tuple
<
std
::
pair
<
Args
...
>>
:
std
::
true_type
{
};
struct
is_specialization_of
<
Template
<
Args
...
>
,
Template
>
:
std
::
true_type
{
};
/// Helper type to replace 'void' in some expressions
/// Helper type to replace 'void' in some expressions
struct
void_type
{
};
struct
void_type
{
};
...
...
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