Move internal headers into detail subdirectory#1001
Conversation
|
Are you proposing this first step for 2.2? I can update #805 to match. |
Yes. Forgot to mention that. Step 1 for v2.2 and steps 2 and 3 for v2.3. |
|
Sounds good to me. |
| include/pybind11/pytypes.h | ||
| include/pybind11/stl.h | ||
| include/pybind11/stl_bind.h | ||
| include/pybind11/typeid.h |
There was a problem hiding this comment.
typeid.h does provide the non-detail namespace py::type_id<T>(), which is a fairly useful function and might be in use. Maybe this one should be left for later?
There was a problem hiding this comment.
My thinking here was that typeid.h is included anyway by cast.h and in turn by pybind11.h, so there's no way to lose out on py::type_id<T>() unless someone is using it without anything else from pybind11. But I wouldn't mind reverting it if I'm overlooking something.
There was a problem hiding this comment.
That's true; it's fine with me to include it in the move. (Maybe type_id() should be moved out into cast.h or somewhere else, but that's not really a big deal—and as an undocumented mostly internal function it was arguably misplaced by not being in detail in the first place).
| @@ -1,5 +1,5 @@ | |||
| /* | |||
| pybind11/typeid.h: Convenience wrapper classes for basic Python types | |||
| pybind11/pytypes.h: Convenience wrapper classes for basic Python types | |||
61de351 to
587cf82
Compare
The header reorganization discussed in #708 can be broken up into 3 main parts:
detailsubdirectory.detail/meta.hfor the metaprogramming bits).castsubdirectory for type casters.Instead of tackling all this at the same time, it would be best to take it in different stages. This PR takes care of number 1 by simply moving the non-user-facing headers (everything fully intact and no user-side changes). This would allow new features like #805 to already make use of the
detailsubdirectory.Number 2 can be done separately in smaller pieces. Number 3 would have some user-facing changes and it would be best to do in conjunction with the caster changes from #864.