Skip to content

static assert Found more than one type matching the predicate #3512

Answered by kerim371
kerim371 asked this question in Q&A
Discussion options

You must be logged in to vote

It seems that I did wrong inheritance structure in pybind module. I should have rather inherit from interfaces:

PYBIND11_MODULE(example, m) {
  auto a = py::class_<
    A,
    AImpl<A>>
    (m, "A")
    .def("A", &A::a);

  auto b = py::class_<
    B,
    BImpl<B>,
    A>
    (m, "B")
    .def("B", &B::b);

  auto c = py::class_<
    C,
    CImpl<C>,
    B,
    A>
    (m, "C")
    .def("C", &C::c);
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kerim371
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant