|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-11-01 09:24:24
OK, this non-const-reference constructor argument fix had a few unexpect
repercussions. The quick fix is to add the following to py.h:
inline const char* from_python(PyObject* x, py::Type<const char *const &>)
{
return from_python(x, py::Type<const char*>());
}
----- Original Message -----
From: "Anton Gluck" <gluc_at_[hidden]>
> This here is the relevant code - I hope it is enough for you to test this:
>
> py::ClassWrapper<std::ifstream> ifstream_class(ClusterForPy, "ifstream");
> ifstream_class.def(py::Constructor<const char*>());
> (there is also a #include <fstream>)
>
> (The same error also happens if I use
> ifstream_class.def(py::Constructor<std::string*>());)
I wouldn't expect that one to work. But this should:
ifstream_class.def(py::Constructor<std::string>());)
> Interestingly, if I take out the ifstream lines, I'm getting very similar
> errors with other lines (the error messages always involve some const & or
> another).
More info, please?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk