mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
fix: add missing std::forward calls (#3443)
* fix: add missing std::forward calls Two of the four cpp_function overloads are missing std::forward calls, which seems like a simple oversight. * add test for https://github.com/pybind/pybind11/pull/3443 * add py tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix test Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -515,3 +515,11 @@ def test_overload_ordering():
|
||||
assert "2. (arg0: {}) -> int".format(uni_name) in str(err.value)
|
||||
assert "3. (arg0: {}) -> int".format(uni_name) in str(err.value)
|
||||
assert "4. (arg0: int) -> int" in str(err.value)
|
||||
|
||||
|
||||
def test_rvalue_ref_param():
|
||||
r = m.RValueRefParam()
|
||||
assert r.func1("123") == 3
|
||||
assert r.func2("1234") == 4
|
||||
assert r.func3("12345") == 5
|
||||
assert r.func4("123456") == 6
|
||||
|
||||
Reference in New Issue
Block a user