Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-12-11 20:12:47


Adrien,

That's a compiler bug. There's not supposed to be a difference between the
signatures
    void set(const float f);
and
    void set(float f);

If you want to work around this bug and keep the parameter const within the
function body, separate the interface from the implementation:

    void set(float f); // declaration
    ...
    void set(const float f) { ; }

Regards,
Dave
----- Original Message -----
From: "Adrien Hernot" <amh_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, December 11, 2000 11:13 AM
Subject: [boost] Exporting C++ class with py_cpp problem

>
> Hi!
>
> I have a problem exporting a method with py_cpp.
> It's a compilation error.
> If I take the 'simple example' of the manual
> (http://people.ne.mediaone.net/abrahams/dowloads/example1.html),
> and add the function:
> void set(const float f) { ; }
> to the class 'world', the compilation do not work anymore.
> error: 'return_value' : none of the 2 overloads can convert....
>
> If I remove the 'const' keyword, it works ok.
>
> Additionaly, is there more documentation of py_cpp than
> the manual cited before ??
>
> Thanks
>
> Adrien
>
>
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk