Skip to content

Commit 4038542

Browse files
authored
Remove friend declaration of py::class_ in py::detail::generic_type (#2613)
This line had two bugs: 1. It declares `py::detail::class_` as `friend`. 2. After fixing that, we would have to change it to `template <typename, typename...>` The first one was introduced ~5 years ago, when a large refactoring was made, probably as an intermediate step during refactoring. The second was made when `generic_type` was made to be agnostic with respect to the order of `py::class_` template parameters. &nbsp; We're removing the declaration altogether, because it was never relied on. This is what makes me think that it was an intermediate step in refactoring that shouldn't have ended up in commit history.
1 parent 6edd0e6 commit 4038542

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

include/pybind11/pybind11.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,6 @@ inline dict globals() {
10271027
PYBIND11_NAMESPACE_BEGIN(detail)
10281028
/// Generic support for creating new Python heap types
10291029
class generic_type : public object {
1030-
template <typename...> friend class class_;
10311030
public:
10321031
PYBIND11_OBJECT_DEFAULT(generic_type, object, PyType_Check)
10331032
protected:

0 commit comments

Comments
 (0)