[C++-sig] Problem with BPL from cvs

Nikolay Mladenov nickm at sitius.com
Thu Aug 7 19:33:56 CEST 2003


I started building with very recent version from the cvs,
and something that was building 1_29_0 now fails.
I have a small example that duplicates it.
Tried compiling with MSVC 6.5 with and without STLPort-4.5.3

//////////////////////////////////////////////////
class OBJ{
public :
    class PROP{};
    PROP prop() const;
};

#include <boost/python.hpp>

using namespace boost::python;
object get_prop(const OBJ &o)
{
    return o.prop();
}

BOOST_PYTHON_MODULE(obj)
{
    scope s(
        class_<OBJ>("OBJ" )
            .def("prop", &get_prop)
        );
    class_<OBJ::PROP> ("PROP");
    
}

////////////////////////////////////////////////

the error message is:
d:\projects\boost_1_31_0\boost\boost\python\object_core.hpp(231) : error
C2893: Failed to specialize function template 'const T *__cdecl
boost::python::api::object::to_ptr(const T &)'
        With the following template arguments:
        'class OBJ::PROP'
        s:\temp\inner.cpp(12) : see reference to function template
instantiation '__thiscall
boost::python::api::object::boost::python::api::object(const class
OBJ::PROP &)' being compiled
d:\projects\boost_1_31_0\boost\boost\python\object_core.hpp(231) : error
C2143: syntax error : missing ')' before 'const'
        s:\temp\inner.cpp(12) : see reference to function template
instantiation '__thiscall
boost::python::api::object::boost::python::api::object(const class
OBJ::PROP &)' being compiled
d:\files\microsoft visual studio\vc98\include\xmemory(70) : fatal error
C1004: unexpected end of file found
        s:\temp\inner.cpp(12) : see reference to function template
instantiation '__thiscall
boost::python::api::object::boost::python::api::object(const class
OBJ::PROP &)' being compiled
Error executing cl.exe.





More information about the Cplusplus-sig mailing list