Skip to content

Fix Trac #10933 incomplete type in "contains" #14

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

Closed
wants to merge 1 commit into from

Conversation

ax3l
Copy link
Contributor

@ax3l ax3l commented Jan 14, 2015

https://svn.boost.org/trac/boost/ticket/10933

Hi,

I am compiling Boost.Python with nvcc/6.5, gcc/4.6.2, python/2.7.8 and cmake/3.0.1 right now.

As a side note, I modified the standard FindPythonLibs.cmake a bit to match the cuda_add_library calls.

During compile, I get the error

boost/python/object_core.hpp(499): error: function "boost::python::api::object_operators<U>::attr(const char *) const" returns incomplete type "boost::python::api::const_object_attribute"

from include/boost/python/object_core.hpp

template <typename U>
template <class T>
object api::object_operators<U>::contains(T const& key) const
{
    return this->attr("__contains__")(object(key));
}

Replacing the return statement with

    return (*this)[object(key)];

seems to compile and my modules work, but I am not sure if the functionality is still ok since I have no idea what this function actually does (nor how to test/trigger it).

It would be great if we can fix that compile error and someone could give me a review.

- experimental, module build works but I have no idea
  if the functionality is still the same
- https://svn.boost.org/trac/boost/ticket/10933
@stefanseefeld
Copy link
Member

Is this still an issue for current versions of nvcc ?

@ax3l
Copy link
Contributor Author

ax3l commented Apr 9, 2018

Can't reproduce it with 8.0.44 from a quick test.

@ax3l ax3l closed this Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants