Scarab  v2.11.1
Project 8 C++ Utility Library
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
optional_caster< T > Struct Template Reference

#include <stl.h>

Public Types

using value_conv = make_caster< typename T::value_type >
 
template<typename T_ >
using cast_op_type = pybind11::detail::movable_cast_op_type< T_ >
 

Public Member Functions

bool load (handle src, bool convert)
 
 operator T* ()
 
 operator T& ()
 
 operator T&& () &&
 

Static Public Member Functions

template<typename T_ >
static handle cast (T_ &&src, return_value_policy policy, handle parent)
 
template<typename T_ , enable_if_t< std::is_same< T, remove_cv_t< T_ >>::value, int > = 0>
static handle cast (T_ *src, return_value_policy policy, handle parent)
 

Static Public Attributes

static constexpr auto name = _("Optional[") + value_conv::name + _("]")
 

Protected Attributes

value
 

Detailed Description

template<typename T>
struct pybind11::detail::optional_caster< T >

Definition at line 262 of file stl.h.

Member Typedef Documentation

◆ cast_op_type

Definition at line 287 of file stl.h.

◆ value_conv

using value_conv = make_caster<typename T::value_type>

Definition at line 263 of file stl.h.

Member Function Documentation

◆ cast() [1/2]

static handle cast ( T_ &&  src,
return_value_policy  policy,
handle  parent 
)
inlinestatic

Definition at line 266 of file stl.h.

◆ cast() [2/2]

static handle cast ( T_ *  src,
return_value_policy  policy,
handle  parent 
)
inlinestatic

Definition at line 287 of file stl.h.

◆ load()

bool load ( handle  src,
bool  convert 
)
inline

Definition at line 273 of file stl.h.

◆ operator T&()

operator T & ( )
inline

Definition at line 287 of file stl.h.

◆ operator T&&()

operator T && ( ) &&
inline

Definition at line 287 of file stl.h.

◆ operator T*()

operator T* ( )
inline

Definition at line 287 of file stl.h.

Member Data Documentation

◆ name

constexpr auto name = _("Optional[") + value_conv::name + _("]")
static

Definition at line 287 of file stl.h.

◆ value

T value
protected

Definition at line 287 of file stl.h.


The documentation for this struct was generated from the following file: