boost python - Return_value_policy for method with void return type and optional parameter -


I have a class with zero method and alternative argument that looks like this:

  Class A {public: zero method (int paragraph 1, ball para 2 = falls) {...}}; BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (method, an :: method, 1, 2) class_ & lt; A & gt; ('A') .def ("method", & amp; a :: method, return_value_policy & lt; reference_existing_object & gt; (), method ());   

What is the correct return_value_policy in this case? I have tried to completely avoid the return policy, but then I have received the compilation after error.

  'boost :: mpl :: vector17 & lt; RT, most_derived & lt; Target, ClassT & gt; :: Type & amp; , T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 & gt; Boost :: python :: detail :: get_signature (RT (__cDEcl ClassT :: *) (T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T -10, T-11, T-12, T-13, T-14) appreciated any suggestions.   

< / P>

= "text">

I have put some things together. Bur I realized that I do not have to use BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS but instead the named argument would have been something like this. Def ("par2"), arg ("par2") = wrong ()):

  def ("method", & amp; a :: method, arg ("par1") Pre>  

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -