[LLVMbugs] [Bug 9006] New: Boost.Python def_readonly broken on trunk

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 19 15:20:47 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=9006

           Summary: Boost.Python def_readonly broken on trunk
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: luc_j_bourhis at mac.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=6025)
 --> (http://llvm.org/bugs/attachment.cgi?id=6025)
Preprocessed boost_python_ext.cpp

~/Developer/Tests/clang-def_readonly> clang++ --version
clang version 2.9 (trunk 123848)
Target: x86_64-apple-darwin10
Thread model: posix

~/Developer/Tests/clang-def_readonly> cat boost_python_ext.cpp 
#include <boost/python/class.hpp>

using namespace boost::python;

template <class T=double>
struct simple
{
  T x;
};

void wrap() {
  class_<simple<> >("simple", no_init)
    .def_readonly("x", &simple<>::x)
    ;
}

~/Developer/Tests/clang-def_readonly> clang++ -I$cctbxroot/boost
-I/System/Library/Frameworks/Python.framework/Headers -c boost_python_ext.cpp
In file included from boost_python_ext.cpp:1:
/Users/luc/Developer/cctbx/boost/boost/python/class.hpp:469:22: error: call to
member function
      'add_property' is ambiguous
        return this->add_property(name, pm_, doc);
               ~~~~~~^~~~~~~~~~~~
/Users/luc/Developer/cctbx/boost/boost/python/class.hpp:282:16: note: in
instantiation of function
      template specialization 'boost::python::class_<simple<double>,
      boost::python::detail::not_specified,
boost::python::detail::not_specified,
      boost::python::detail::not_specified>::def_readonly_impl<double,
simple<double> >' requested here
        return this->def_readonly_impl(name, d, doc
BOOST_PYTHON_DATA_MEMBER_HELPER(D));
               ^
boost_python_ext.cpp:12:3: note: in instantiation of function template
specialization
      'boost::python::class_<simple<double>,
boost::python::detail::not_specified,
      boost::python::detail::not_specified,
boost::python::detail::not_specified>::def_readonly<double
      simple<double>::*>' requested here
  class_<simple<> >("simple", no_init)
  ^
In file included from boost_python_ext.cpp:1:
/Users/luc/Developer/cctbx/boost/boost/python/class.hpp:306:11: note: candidate
function [with Get =
      double simple<double>::*]
    self& add_property(char const* name, Get fget, char const* docstr = 0)
          ^
/Users/luc/Developer/cctbx/boost/boost/python/class.hpp:313:11: note: candidate
function [with Get =
      double simple<double>::*, Set = const char *]
    self& add_property(char const* name, Get fget, Set fset, char const* docstr
= 0)
          ^
1 error generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list