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
50b199ce
Commit
50b199ce
authored
Feb 12, 2021
by
Ralf W. Grosse-Kunstleve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DEBUGGING_MSVC_2015: -j 1 to not have interleaved error messages.
parent
0587d63e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
.github/workflows/ci.yml
+3
-3
include/pybind11/cast.h
+3
-3
tests/test_virtual_functions.cpp
+1
-1
No files found.
.github/workflows/ci.yml
View file @
50b199ce
...
...
@@ -755,8 +755,8 @@ jobs:
fail-fast
:
false
matrix
:
python
:
-
2.7
-
3.6
#
- 2.7
#
- 3.6
-
3.7
# todo: check/cpptest does not support 3.8+ yet
...
...
@@ -789,7 +789,7 @@ jobs:
-DDOWNLOAD_EIGEN=ON
-
name
:
Build C++14
run
:
cmake --build build -j
2
run
:
cmake --build build -j
1
-
name
:
Run all checks
run
:
cmake --build build -t check
...
...
include/pybind11/cast.h
View file @
50b199ce
...
...
@@ -2520,7 +2520,7 @@ T cast(const handle &handle) {
using
namespace
detail
;
static_assert
(
!
cast_is_temporary_value_reference
<
T
>::
value
,
"Unable to cast type to reference: value is local to type caster"
);
return
cast_op
<
T
>
(
load_type
<
T
>
(
handle
));
return
cast_op
<
T
>
(
load_type
<
T
>
(
handle
));
// HEERE 2
}
// pytype -> pytype (calls converting constructor)
...
...
@@ -2575,7 +2575,7 @@ template <typename T> detail::enable_if_t<detail::move_if_unreferenced<T>::value
return
move
<
T
>
(
std
::
move
(
object
));
}
template
<
typename
T
>
detail
::
enable_if_t
<
detail
::
move_never
<
T
>::
value
,
T
>
cast
(
object
&&
object
)
{
return
cast
<
T
>
(
object
);
return
cast
<
T
>
(
object
);
// HERE 2
}
template
<
typename
T
>
T
object
::
cast
()
const
&
{
return
pybind11
::
cast
<
T
>
(
*
this
);
}
...
...
@@ -2605,7 +2605,7 @@ template <typename T> enable_if_t<!cast_is_temporary_value_reference<T>::value,
// though if it's in dead code, so we provide a "trampoline" to pybind11::cast that only does anything in
// cases where pybind11::cast is valid.
template
<
typename
T
>
enable_if_t
<!
cast_is_temporary_value_reference
<
T
>::
value
,
T
>
cast_safe
(
object
&&
o
)
{
return
pybind11
::
cast
<
T
>
(
std
::
move
(
o
));
}
return
pybind11
::
cast
<
T
>
(
std
::
move
(
o
));
}
// HEERE 1
template
<
typename
T
>
enable_if_t
<
cast_is_temporary_value_reference
<
T
>::
value
,
T
>
cast_safe
(
object
&&
)
{
pybind11_fail
(
"Internal error: cast_safe fallback invoked"
);
}
template
<>
inline
void
cast_safe
<
void
>
(
object
&&
)
{}
...
...
tests/test_virtual_functions.cpp
View file @
50b199ce
...
...
@@ -78,7 +78,7 @@ public:
// We can return reference types for compatibility with C++ virtual interfaces that do so, but
// note they have some significant limitations (see the documentation).
const
std
::
string
&
get_string1
()
override
{
PYBIND11_OVERRIDE
(
PYBIND11_OVERRIDE
(
// HEERE 0
const
std
::
string
&
,
/* Return type */
ExampleVirt
,
/* Parent class */
get_string1
,
/* Name of function */
...
...
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