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
7d0162a2
Commit
7d0162a2
authored
Apr 25, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor cleanups
parent
0871228f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
include/pybind11/common.h
+6
-1
No files found.
include/pybind11/common.h
View file @
7d0162a2
...
@@ -137,19 +137,24 @@ enum class return_value_policy : int {
...
@@ -137,19 +137,24 @@ enum class return_value_policy : int {
/** Automatic: copy objects returned as values and take ownership of objects
/** Automatic: copy objects returned as values and take ownership of objects
returned as pointers */
returned as pointers */
automatic
=
0
,
automatic
=
0
,
/** Automatic variant 2: copy objects returned as values and reference objects
/** Automatic variant 2: copy objects returned as values and reference objects
returned as pointers */
returned as pointers */
automatic_reference
,
automatic_reference
,
/** Reference the object and take ownership. Python will call the
/** Reference the object and take ownership. Python will call the
destructor and delete operator when the reference count reaches zero */
destructor and delete operator when the reference count reaches zero */
take_ownership
,
take_ownership
,
/** Reference the object, but do not take ownership (dangerous when C++ code
/** Reference the object, but do not take ownership (dangerous when C++ code
deletes it and Python still has a nonzero reference count) */
deletes it and Python still has a nonzero reference count) */
reference
,
reference
,
/** Reference the object, but do not take ownership. The object is considered
/** Reference the object, but do not take ownership. The object is considered
be owned by the C++ instance whose method or property returned it. The
be owned by the C++ instance whose method or property returned it. The
Python object will increase the reference count of this 'parent' by 1 */
Python object will increase the reference count of this 'parent' by 1 */
reference_internal
,
reference_internal
,
/// Create a new copy of the returned object, which will be owned by Python
/// Create a new copy of the returned object, which will be owned by Python
copy
copy
};
};
...
@@ -252,7 +257,7 @@ template <typename T> struct intrinsic_type<T&&> { typedef type
...
@@ -252,7 +257,7 @@ template <typename T> struct intrinsic_type<T&&> { typedef type
template
<
typename
T
,
size_t
N
>
struct
intrinsic_type
<
const
T
[
N
]
>
{
typedef
typename
intrinsic_type
<
T
>::
type
type
;
};
template
<
typename
T
,
size_t
N
>
struct
intrinsic_type
<
const
T
[
N
]
>
{
typedef
typename
intrinsic_type
<
T
>::
type
type
;
};
template
<
typename
T
,
size_t
N
>
struct
intrinsic_type
<
T
[
N
]
>
{
typedef
typename
intrinsic_type
<
T
>::
type
type
;
};
template
<
typename
T
,
size_t
N
>
struct
intrinsic_type
<
T
[
N
]
>
{
typedef
typename
intrinsic_type
<
T
>::
type
type
;
};
/** \brief SFINAE helper class to check if a copy constructor is usable (in contrast to
/** \brief SFINAE helper class to check if a copy constructor is usable (in contrast to
* std::is_copy_constructible, this class also checks if the 'new' operator is accessible */
* std::is_copy_constructible, this class also checks if the 'new' operator is accessible */
template
<
typename
T
>
struct
is_copy_constructible
{
template
<
typename
T
>
struct
is_copy_constructible
{
template
<
typename
T2
>
static
std
::
true_type
test
(
decltype
(
new
T2
(
std
::
declval
<
typename
std
::
add_lvalue_reference
<
T2
>::
type
>
()))
*
);
template
<
typename
T2
>
static
std
::
true_type
test
(
decltype
(
new
T2
(
std
::
declval
<
typename
std
::
add_lvalue_reference
<
T2
>::
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