You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the above line, the wrong concat function will be found due ADL rules while compiling the example causing the failure.
I originally discovered this issue in code I had that created bindings for nlohmann::json from https://github.com/nlohmann/json. The reproducible example code is based off the code there. In that case, the concat function was inside the nlohmann::detail namespace and wasn't discoverable until nlohmann::json inherited from a class inside the detail namespace (from commit nlohmann/json@bed648c).
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.11.1
Problem description
If you have a
concat
function in the code you are creating bindings for, it is possible for pybind11 to fail to compile the bindings.pybind11/include/pybind11/cast.h
Line 1477 in 705efcc
At the above line, the wrong
concat
function will be found due ADL rules while compiling the example causing the failure.I originally discovered this issue in code I had that created bindings for
nlohmann::json
from https://github.com/nlohmann/json. The reproducible example code is based off the code there. In that case, theconcat
function was inside thenlohmann::detail
namespace and wasn't discoverable untilnlohmann::json
inherited from a class inside thedetail
namespace (from commit nlohmann/json@bed648c).Compiler explorer link to example: https://godbolt.org/z/Y1Y6nave9
Reproducible example code
Is this a regression? Put the last known working version here if it is.
Not a regression
The text was updated successfully, but these errors were encountered: