Skip to content

Commit

Permalink
tests: add test for ADL on concat
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Mar 27, 2024
1 parent 5a489d5 commit bade99c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_custom_type_casters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ struct type_caster<other_lib::MyType> : public other_lib::my_caster {};
} // namespace detail
} // namespace PYBIND11_NAMESPACE

// This simply is required to compile
namespace ADL_issue {
template <typename OutStringType = std::string, typename... Args>
OutStringType concat(Args &&...) {
return OutStringType();
}

struct test {};
} // namespace ADL_issue

TEST_SUBMODULE(custom_type_casters, m) {
// test_custom_type_casters

Expand Down Expand Up @@ -206,4 +216,6 @@ TEST_SUBMODULE(custom_type_casters, m) {
py::return_value_policy::reference);

m.def("other_lib_type", [](other_lib::MyType x) { return x; });

m.def("_adl_issue", [](const ADL_issue::test &) {});
}

0 comments on commit bade99c

Please sign in to comment.