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
ceb0ea7c
Commit
ceb0ea7c
authored
Feb 14, 2021
by
Ralf W. Grosse-Kunstleve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing py::classu, because it does not seem useful enough.
parent
795b2bc9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
13 deletions
+1
-13
include/pybind11/smart_holder.h
+0
-8
tests/test_class_sh_unique_ptr_member.cpp
+1
-5
No files found.
include/pybind11/smart_holder.h
View file @
ceb0ea7c
...
@@ -18,12 +18,4 @@ public:
...
@@ -18,12 +18,4 @@ public:
using
class_
<
type_
,
smart_holder
,
options
...
>::
class_
;
using
class_
<
type_
,
smart_holder
,
options
...
>::
class_
;
};
};
// Similar in idea to `py::classh`, but for `std::unique_ptr<U>` holder, to support
// an easier transition to `py::smart_holder` as default holder.
template
<
typename
type_
,
typename
...
options
>
class
classu
:
public
class_
<
type_
,
std
::
unique_ptr
<
type_
>
,
options
...
>
{
public
:
using
class_
<
type_
,
std
::
unique_ptr
<
type_
>
,
options
...
>::
class_
;
};
PYBIND11_NAMESPACE_END
(
PYBIND11_NAMESPACE
)
PYBIND11_NAMESPACE_END
(
PYBIND11_NAMESPACE
)
tests/test_class_sh_unique_ptr_member.cpp
View file @
ceb0ea7c
...
@@ -41,9 +41,6 @@ private:
...
@@ -41,9 +41,6 @@ private:
}
// namespace pybind11_tests
}
// namespace pybind11_tests
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
class_sh_unique_ptr_member
::
pointee
)
PYBIND11_SMART_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
class_sh_unique_ptr_member
::
pointee
)
PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS
(
pybind11_tests
::
class_sh_unique_ptr_member
::
ptr_owner
,
std
::
unique_ptr
<
pybind11_tests
::
class_sh_unique_ptr_member
::
ptr_owner
>
)
namespace
pybind11_tests
{
namespace
pybind11_tests
{
namespace
class_sh_unique_ptr_member
{
namespace
class_sh_unique_ptr_member
{
...
@@ -53,8 +50,7 @@ TEST_SUBMODULE(class_sh_unique_ptr_member, m) {
...
@@ -53,8 +50,7 @@ TEST_SUBMODULE(class_sh_unique_ptr_member, m) {
m
.
def
(
"make_unique_pointee"
,
make_unique_pointee
);
m
.
def
(
"make_unique_pointee"
,
make_unique_pointee
);
// Could also be class_, but can conveniently be used for testing classu.
py
::
class_
<
ptr_owner
>
(
m
,
"ptr_owner"
)
py
::
classu
<
ptr_owner
>
(
m
,
"ptr_owner"
)
.
def
(
py
::
init
<
std
::
unique_ptr
<
pointee
>>
(),
py
::
arg
(
"ptr"
))
.
def
(
py
::
init
<
std
::
unique_ptr
<
pointee
>>
(),
py
::
arg
(
"ptr"
))
.
def
(
"is_owner"
,
&
ptr_owner
::
is_owner
)
.
def
(
"is_owner"
,
&
ptr_owner
::
is_owner
)
.
def
(
"give_up_ownership_via_unique_ptr"
,
&
ptr_owner
::
give_up_ownership_via_unique_ptr
)
.
def
(
"give_up_ownership_via_unique_ptr"
,
&
ptr_owner
::
give_up_ownership_via_unique_ptr
)
...
...
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