Can't bind function that returns const char *
Using Boost.Python, I can't seem to be able to bind any function that returns a const char* example:

    class Bar
    {
     private:
       int x;
     public:
       Bar():x(0){}
       Bar(int x) : x(x) {}
       int get_x() const { return x; }
       void set_x(int x) { this->x = x; }
       const char *get_str(){return "hello";}
    };
    
    BOOST_PYTHON_MODULE(internal_refs)
    {
       class_<Bar>("Bar")
          .def("get_x", &Bar::get_x)
          .def("set_x", &Bar::set_x)
          .def("get_str", &Bar::get_str, return_value_policy<reference_existing_object>())            
          ;
    }

I get the following error:

    /usr/local/include/boost/python/object/make_instance.hpp:27:9: error: no matching function for call to ‘assertion_failed(mpl_::failed************ boost::mpl::or_<boost::is_class<char>, boost::is_union<char>, mpl_::bool_<false>, mpl_::bool_<false>, mpl_::bool_<false> >::************)’


Can't bind function that returns const char *
===

Using Boost.Python, I can't seem to be able to bind any function that returns a const char* example:

    class Bar
    {
     private:
       int x;
     public:
       Bar():x(0){}
       Bar(int x) : x(x) {}
       int get_x() const { return x; }
       void set_x(int x) { this->x = x; }
       const char *get_str(){return "hello";}
    };
    
    BOOST_PYTHON_MODULE(internal_refs)
    {
       class_<Bar>("Bar")
          .def("get_x", &Bar::get_x)
          .def("set_x", &Bar::set_x)
          .def("get_str", &Bar::get_str, return_value_policy<reference_existing_object>())            
          ;
    }

I get the following error:

    /usr/local/include/boost/python/object/make_instance.hpp:27:9: error: no matching function for call to ‘assertion_failed(mpl_::failed************ boost::mpl::or_<boost::is_class<char>, boost::is_union<char>, mpl_::bool_<false>, mpl_::bool_<false>, mpl_::bool_<false> >::************)’

