Skip to content

Commit bade99c

Browse files
committed
tests: add test for ADL on concat
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 5a489d5 commit bade99c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_custom_type_casters.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ struct type_caster<other_lib::MyType> : public other_lib::my_caster {};
134134
} // namespace detail
135135
} // namespace PYBIND11_NAMESPACE
136136

137+
// This simply is required to compile
138+
namespace ADL_issue {
139+
template <typename OutStringType = std::string, typename... Args>
140+
OutStringType concat(Args &&...) {
141+
return OutStringType();
142+
}
143+
144+
struct test {};
145+
} // namespace ADL_issue
146+
137147
TEST_SUBMODULE(custom_type_casters, m) {
138148
// test_custom_type_casters
139149

@@ -206,4 +216,6 @@ TEST_SUBMODULE(custom_type_casters, m) {
206216
py::return_value_policy::reference);
207217

208218
m.def("other_lib_type", [](other_lib::MyType x) { return x; });
219+
220+
m.def("_adl_issue", [](const ADL_issue::test &) {});
209221
}

0 commit comments

Comments
 (0)