Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8cf1cdb
Incomplete attempt to address regression introduced in #5381
francesco-ballarin Oct 5, 2024
9d107d2
style: pre-commit fixes
pre-commit-ci[bot] Oct 5, 2024
b508a07
Revert "style: pre-commit fixes"
francesco-ballarin Oct 6, 2024
95e0325
Revert "Incomplete attempt to address regression introduced in #5381"
francesco-ballarin Oct 6, 2024
8cbca65
Simpler fix for the regression introduced in #5381
francesco-ballarin Oct 6, 2024
4c87a23
style: pre-commit fixes
pre-commit-ci[bot] Oct 6, 2024
b375ad7
Added if constexpr workaround
gentlegiantJGC Oct 10, 2024
56758c7
style: pre-commit fixes
pre-commit-ci[bot] Oct 10, 2024
e55e864
Replace if constexpr with template struct
gentlegiantJGC Oct 10, 2024
badb28d
style: pre-commit fixes
pre-commit-ci[bot] Oct 10, 2024
6494448
Made comment clearer
gentlegiantJGC Oct 10, 2024
84cd376
Added test cases
gentlegiantJGC Oct 12, 2024
1c845cf
style: pre-commit fixes
pre-commit-ci[bot] Oct 12, 2024
5965a65
Fixed is_same_or_base_of reference
gentlegiantJGC Oct 12, 2024
add8277
style: pre-commit fixes
pre-commit-ci[bot] Oct 12, 2024
c4ce357
Added static assert messages
gentlegiantJGC Oct 12, 2024
8b9e5d1
style: pre-commit fixes
pre-commit-ci[bot] Oct 12, 2024
ccb165b
Replaced typedef with using
gentlegiantJGC Oct 12, 2024
8bc767d
style: pre-commit fixes
pre-commit-ci[bot] Oct 12, 2024
b7c4fe9
Back out `ForwardClassPtr` (to be discussed separately). Tested local…
rwgk Oct 12, 2024
b778cc6
Shuffle new `static_assert()` and leave error messages blank (they ar…
rwgk Oct 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Back out ForwardClassPtr (to be discussed separately). Tested local…
…ly with clang-tidy.
  • Loading branch information
rwgk committed Oct 12, 2024
commit b7c4fe9211be892d447122e7c033bac210eeeed0
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