Skip to content

Commit 399a635

Browse files
authored
Merge branch 'main' into refixPR154556
2 parents 6b7ef38 + e8c2241 commit 399a635

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

orc-rt/include/orc-rt/bind.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ template <typename Fn, typename... BoundArgTs> class BoundFn {
2525
private:
2626
template <size_t... Is, typename... ArgTs>
2727
auto callExpandingBound(std::index_sequence<Is...>, ArgTs &&...Args) {
28-
return F(std::get<Is>(BoundArgs)..., std::move(Args)...);
28+
return F(std::get<Is>(BoundArgs)..., std::forward<ArgTs>(Args)...);
2929
}
3030

3131
public:

orc-rt/unittests/bind-test.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ TEST(BindTest, MinimalCopies) {
7171
EXPECT_EQ(OpCounter::destructions(), 2U);
7272
}
7373

74+
TEST(BindTest, ForwardUnboundArgs) {
75+
auto B = bind_front([](int &) {});
76+
int N = 7;
77+
B(N);
78+
}
79+
7480
static int increment(int N) { return N + 1; }
7581

7682
TEST(BindTest, BindFunction) {

0 commit comments

Comments
 (0)