Skip to content

Commit e05c161

Browse files
committed
fix: compiler does the right thing here, not sure why
Signed-off-by: Henry Schreiner <[email protected]>
1 parent da3e45a commit e05c161

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Configure
4949
run: cmake --preset tidy
5050
- name: Build
51-
run: cmake --build -preset tidy
51+
run: cmake --build --preset tidy
5252

5353
- name: Embedded
5454
run: cmake --build --preset tidy -t cpptest

include/pybind11/cast.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,10 @@ class tuple_caster {
817817
cast_impl(T &&src, return_value_policy policy, handle parent, index_sequence<Is...>) {
818818
PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(src, policy, parent);
819819
PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(policy, parent);
820+
820821
std::array<object, size> entries{{reinterpret_steal<object>(
821-
make_caster<Ts>::cast(std::get<Is>(src), policy, parent))...}};
822+
// NOLINTNEXTLINE(bugprone-use-after-move)
823+
make_caster<Ts>::cast(std::get<Is>(std::forward<T>(src)), policy, parent))...}};
822824
for (const auto &entry : entries) {
823825
if (!entry) {
824826
return handle();

0 commit comments

Comments
 (0)