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
3dabb8bb
Commit
3dabb8bb
authored
Feb 12, 2021
by
Ralf W. Grosse-Kunstleve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DEBUGGING_MSVC_2015: reusing detail::cast_op_type in smart_holder_type_caster.
parent
50b199ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
include/pybind11/cast.h
+6
-2
No files found.
include/pybind11/cast.h
View file @
3dabb8bb
...
@@ -1387,6 +1387,7 @@ struct smart_holder_type_caster : smart_holder_type_caster_load<T>,
...
@@ -1387,6 +1387,7 @@ struct smart_holder_type_caster : smart_holder_type_caster_load<T>,
// clang-format off
// clang-format off
#if 0
template <typename T_>
template <typename T_>
using cast_op_type = conditional_t<
using cast_op_type = conditional_t<
std::is_same<remove_reference_t<T_>, T const *>::value,
std::is_same<remove_reference_t<T_>, T const *>::value,
...
@@ -1396,10 +1397,13 @@ struct smart_holder_type_caster : smart_holder_type_caster_load<T>,
...
@@ -1396,10 +1397,13 @@ struct smart_holder_type_caster : smart_holder_type_caster_load<T>,
conditional_t<std::is_same<T_, T const &>::value,
conditional_t<std::is_same<T_, T const &>::value,
T const &,
T const &,
T &>>>;
T &>>>;
#else
template
<
typename
T_
>
using
cast_op_type
=
detail
::
cast_op_type
<
T_
>
;
#endif
ope
rator
T
const
&
()
{
return
this
->
loaded_as_lvalue_ref
();
}
//
rator T const&() { return this->loaded_as_lvalue_ref(); }
operator
T
&
()
{
return
this
->
loaded_as_lvalue_ref
();
}
operator
T
&
()
{
return
this
->
loaded_as_lvalue_ref
();
}
ope
rator
T
const
*
()
{
return
this
->
loaded_as_raw_ptr_unowned
();
}
//
rator T const*() { return this->loaded_as_raw_ptr_unowned(); }
operator
T
*
()
{
return
this
->
loaded_as_raw_ptr_unowned
();
}
operator
T
*
()
{
return
this
->
loaded_as_raw_ptr_unowned
();
}
// clang-format on
// clang-format on
...
...
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