Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update class.cpp to avoid compiler warnings #283

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
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
21 changes: 0 additions & 21 deletions source/class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,27 +662,6 @@ bool is_callback_structure_constructible(CXXRecordDecl const *C)
return true;
}


// call_back_function_body_template is almost like PYBIND11_OVERLOAD_INT but specify pybind11::return_value_policy::reference
// #define PYBIND11_OVERLOAD_INT(ret_type, cname, name, ...) { \
// pybind11::gil_scoped_acquire gil; \
// pybind11::function overload = pybind11::get_overload(static_cast<const cname *>(this), name); \
// if (overload) \
// return overload(__VA_ARGS__).template cast<ret_type>(); }
//
// pybind11::gil_scoped_acquire gil; \
// pybind11::function overload = pybind11::get_overload(static_cast<const cname *>(this), name); \
// if (overload) { \
// auto o = overload(__VA_ARGS__); \
// if (pybind11::detail::cast_is_temporary_value_reference<ret_type>::value) { \
// static pybind11::detail::overload_caster_t<ret_type> caster; \
// return pybind11::detail::cast_ref<ret_type>(std::move(o), caster); \
// } \
// else return pybind11::detail::cast_safe<ret_type>(std::move(o)); \
// } \
// }


const char *call_back_function_body_template = R"_(
pybind11::gil_scoped_acquire gil;
pybind11::function overload = pybind11::get_overload(static_cast<const {0} *>(this), "{1}");
Expand Down
Loading