[C++-sig] Py++ module for code with protected operator=
macieksitarz at wp.pl
Sat Mar 20 21:12:05 CET 2010
On 20.03.2010 20:47, Roman Yakovenko wrote:
> On Sat, Mar 20, 2010 at 9:15 PM, Maciej Sitarz<macieksitarz at wp.pl> wrote:
>> On 20.03.2010 19:12, Roman Yakovenko wrote:
>>> On Fri, Mar 19, 2010 at 6:42 PM, Maciej Sitarz<macieksitarz at wp.pl> wrote:
>> The compile errors are still the same:
>> generated.cpp:40: instantiated from here
>> test.h:6: error: 'JobPropertyWrapper& JobPropertyWrapper::operator=(const
>> JobPropertyWrapper&)' is protected
> Sorry, I missed the point in the initial post. The error has nothing
> to do with generated code. You can define class with protected
> operator=, but you will not be able to insert it into std::vector,
> because it requires public operator= .
Em... but the example main() compiles and works... unless I want to
'push_back' object to the vector.
> I think, you will have to change your code.
I could change it in the example, but I can't change the code for which
I'm making the python module.
I think I should investigate how the vector is created and put into the
function in the original project.
Or maybe you have other suggestions?
More information about the Cplusplus-sig