[C++-sig] No to_python (by-value) converter found for C++ type

Roman Yakovenko roman.yakovenko at gmail.com
Tue May 25 09:31:03 CEST 2010


On Tue, May 25, 2010 at 9:58 AM, abhi.sri45
<abhishek.srivastava at nechclst.in> wrote:
>
> Hi,
>
>>mb = module_builder_t( ... )
>>mb.class_(...).noncopyable = False
>
> This does not works in my case.
>
> Example code is:
>
> enum CallStatus
> {
>        SUCCESS = 423,
>        FAILURE = 764
> };
>
> template<class Result>
> struct CallResult
> {
> public:
>        CallResult(CallStatus const callStatus)
>        : status(callStatus)
>        {
>        }
>
>        CallResult(CallStatus const callStatus, Result const & result)
>        : status(callStatus), result(result)
>        {
>        }
>        /*
>        CallResult(CallResult const& callResult)
>        {
>                status = callResult.status;
>                result = callResult.result;
>        }
>        */
>        CallStatus const status;
>        Result const result;
>     //   boost::optional<Result> const result;
> };


May be I miss something, but this class has "const member variable"
and doesn't have user define copy constructor ( it is commented out ).
In this case the class indeed noncopyable.

Am I wrong?


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/


More information about the Cplusplus-sig mailing list