Skip to content

Commit

Permalink
Back out ForwardClassPtr (to be discussed separately). Tested local…
Browse files Browse the repository at this point in the history
…ly with clang-tidy.
  • Loading branch information
rwgk committed Oct 12, 2024
1 parent 8bc767d commit b7c4fe9
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/test_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ void bind_empty0(py::module_ &m) {

namespace pr5396_forward_declared_class {
class ForwardClass;
using ForwardClassPtr = class ForwardClass *;
class Args : public py::args {};
} // namespace pr5396_forward_declared_class

Expand All @@ -65,10 +64,6 @@ static_assert(!py::detail::is_same_or_base_of<
py::args,
test_class::pr5396_forward_declared_class::ForwardClass>::value,
"ForwardClass is not the same or base of py::args.");
static_assert(!py::detail::is_same_or_base_of<
py::args,
test_class::pr5396_forward_declared_class::ForwardClassPtr>::value,
"ForwardClassPtr is not the same or base of py::args.");
static_assert(py::detail::is_same_or_base_of<py::args, py::args>::value, "py::args is py::args.");
static_assert(
py::detail::is_same_or_base_of<py::args,
Expand Down Expand Up @@ -575,18 +570,8 @@ TEST_SUBMODULE(class_, m) {
});

test_class::pr4220_tripped_over_this::bind_empty0(m);

// Test constructing a pybind11 class around a pointer to an incomplete type. #5396
py::class_<test_class::pr5396_forward_declared_class::ForwardClassPtr>(m, "ForwardClassPtr");
}

namespace test_class {
namespace pr5396_forward_declared_class {
// Define the forward declared class after it is used.
class ForwardClass {};
} // namespace pr5396_forward_declared_class
} // namespace test_class

template <int N>
class BreaksBase {
public:
Expand Down

0 comments on commit b7c4fe9

Please sign in to comment.