1 [section boost/python/to_python_value.hpp]
3 `to_python_value` is a model of [link concepts.resultconverter ResultConverter] which copies its argument into a new Python object.
5 [section Class template `to_python_value`]
7 namespace boost { namespace python
10 struct to_python_value
12 typedef typename add_reference<
13 typename add_const<T>::type
14 >::type argument_type;
16 static bool convertible();
17 PyObject* operator()(argument_type) const;
22 [section Class `to_python_value` observers]
23 ``static bool convertible();``
25 [[Returns][`true` iff a converter has been registered which can convert `T` to python by-value. ]]
27 ``PyObject* operator()(argument_type x) const;``
29 [[Requires][`convertible() == true`]]
30 [[Effects][converts `x` to python]]
31 [[Returns][the resulting Python object iff a converter for `T` has been registered, `0` otherwise. ]]