Opened 8 years ago

Last modified 8 years ago

#10933 new Bugs

Boost.Python incomplete type in "contains"

Reported by: a.huebl@… Owned by: Stefan Seefeld
Milestone: To Be Determined Component: python USE GITHUB
Version: Boost 1.57.0 Severity: Showstopper
Keywords: nvcc python compile Cc:

Description

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.

Attachments (1)

patchContainsPython.txt (427 bytes ) - added by a.huebl@… 8 years ago.
Patch: Fix Incomplete Type

Download all attachments as: .zip

Change History (2)

by a.huebl@…, 8 years ago

Attachment: patchContainsPython.txt added

Patch: Fix Incomplete Type

comment:1 by Stefan Seefeld, 8 years ago

Owner: changed from Ralf W. Grosse-Kunstleve to Stefan Seefeld
Note: See TracTickets for help on using tickets.