Nektar++
Namespaces | Classes | Functions
boost::python::converter Namespace Reference

Namespaces

 detail
 

Classes

struct  shared_ptr_from_python_new
 
struct  shared_ptr_from_python
 

Functions

template<class T >
PyObject * shared_ptr_to_python (std::shared_ptr< T > const &x)
 

Function Documentation

◆ shared_ptr_to_python()

template<class T >
PyObject* boost::python::converter::shared_ptr_to_python ( std::shared_ptr< T > const &  x)

Definition at line 201 of file ShPtrFixes.hpp.

202 {
203  if (!x)
204  return python::detail::none();
205  else if (shared_ptr_deleter* d = std::get_deleter<shared_ptr_deleter>(x))
206  return incref(get_pointer(d->owner));
207  else
208  return converter::registered<std::shared_ptr<T> const&>::converters.to_python(&x);
209 }

Referenced by boost::python::detail::shared_ptr_to_python_value< T >::operator()().