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
828b6099
Commit
828b6099
authored
Jan 12, 2021
by
Ralf W. Grosse-Kunstleve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pure clang-format change (applied to original type_caster_generic::cast).
parent
3004c41c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
tests/test_classh_wip.cpp
+7
-7
No files found.
tests/test_classh_wip.cpp
View file @
828b6099
...
@@ -190,8 +190,9 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
...
@@ -190,8 +190,9 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
// type_caster_base END
// type_caster_base END
// Originally type_caster_generic::cast.
// Originally type_caster_generic::cast.
// clang-format off
PYBIND11_NOINLINE
static
handle
cast
(
const
void
*
_src
,
PYBIND11_NOINLINE
static
handle
cast
(
const
void
*
_src
,
return_value_policy
policy
,
handle
parent
,
return_value_policy
policy
,
handle
parent
,
const
detail
::
type_info
*
tinfo
,
const
detail
::
type_info
*
tinfo
,
void
*
(
*
copy_constructor
)(
const
void
*
),
void
*
(
*
copy_constructor
)(
const
void
*
),
void
*
(
*
move_constructor
)(
const
void
*
),
void
*
(
*
move_constructor
)(
const
void
*
),
...
@@ -239,8 +240,8 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
...
@@ -239,8 +240,8 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
#else
#else
std
::
string
type_name
(
tinfo
->
cpptype
->
name
());
std
::
string
type_name
(
tinfo
->
cpptype
->
name
());
detail
::
clean_type_id
(
type_name
);
detail
::
clean_type_id
(
type_name
);
throw
cast_error
(
"return_value_policy = copy, but type "
+
throw
cast_error
(
"return_value_policy = copy, but type "
+
type_name
type_name
+
" is non-copyable!"
);
+
" is non-copyable!"
);
#endif
#endif
}
}
wrapper
->
owned
=
true
;
wrapper
->
owned
=
true
;
...
@@ -259,8 +260,8 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
...
@@ -259,8 +260,8 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
#else
#else
std
::
string
type_name
(
tinfo
->
cpptype
->
name
());
std
::
string
type_name
(
tinfo
->
cpptype
->
name
());
detail
::
clean_type_id
(
type_name
);
detail
::
clean_type_id
(
type_name
);
throw
cast_error
(
"return_value_policy = move, but type "
+
throw
cast_error
(
"return_value_policy = move, but type "
+
type_name
type_name
+
" is neither movable nor copyable!"
);
+
" is neither movable nor copyable!"
);
#endif
#endif
}
}
wrapper
->
owned
=
true
;
wrapper
->
owned
=
true
;
...
@@ -280,7 +281,6 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
...
@@ -280,7 +281,6 @@ struct type_caster<mpty> : smart_holder_type_caster_load<mpty> {
return
inst
.
release
();
return
inst
.
release
();
}
}
// clang-format on
};
};
template
<>
template
<>
...
...
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