Public Types | Public Member Functions | Static Public Member Functions | List of all members
type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > > Struct Template Reference

#include <cast.h>

Public Types

using _py_type_0 = conditional_t< sizeof(T)<=sizeof(long), long, long long >
 
using _py_type_1 = conditional_t< std::is_signed< T >::value, _py_type_0, typename std::make_unsigned< _py_type_0 >::type >
 
using py_type = conditional_t< std::is_floating_point< T >::value, double, _py_type_1 >
 

Public Member Functions

bool load (handle src, bool convert)
 
 PYBIND11_TYPE_CASTER (T, _< std::is_integral< T >::value >("int","float"))
 

Static Public Member Functions

template<typename U = T>
static std::enable_if< std::is_floating_point< U >::value, handle >::type cast (U src, return_value_policy, handle)
 
template<typename U = T>
static std::enable_if<!std::is_floating_point< U >::value &&std::is_signed< U >::value &&(sizeof(U)<=sizeof(long)), handle >::type cast (U src, return_value_policy, handle)
 
template<typename U = T>
static std::enable_if<!std::is_floating_point< U >::value &&std::is_unsigned< U >::value &&(sizeof(U)<=sizeof(unsigned long)), handle >::type cast (U src, return_value_policy, handle)
 
template<typename U = T>
static std::enable_if<!std::is_floating_point< U >::value &&std::is_signed< U >::value &&(sizeof(U) > sizeof(long)), handle >::type cast (U src, return_value_policy, handle)
 
template<typename U = T>
static std::enable_if<!std::is_floating_point< U >::value &&std::is_unsigned< U >::value &&(sizeof(U) > sizeof(unsigned long)), handle >::type cast (U src, return_value_policy, handle)
 

Detailed Description

template<typename T>
struct type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >

Definition at line 1011 of file cast.h.

Member Typedef Documentation

template<typename T >
using type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >::_py_type_0 = conditional_t<sizeof(T) <= sizeof(long), long, long long>

Definition at line 1012 of file cast.h.

template<typename T >
using type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >::_py_type_1 = conditional_t<std::is_signed<T>::value, _py_type_0, typename std::make_unsigned<_py_type_0>::type>

Definition at line 1013 of file cast.h.

template<typename T >
using type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >::py_type = conditional_t<std::is_floating_point<T>::value, double, _py_type_1>

Definition at line 1014 of file cast.h.

Member Function Documentation

template<typename T >
template<typename U = T>
static std::enable_if<std::is_floating_point<U>::value, handle>::type type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >::cast ( U  src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 1068 of file cast.h.

template<typename T >
template<typename U = T>
static std::enable_if<!std::is_floating_point<U>::value && std::is_signed<U>::value && (sizeof(U) <= sizeof(long)), handle>::type type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >::cast ( U  src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 1074 of file cast.h.

template<typename T >
template<typename U = T>
static std::enable_if<!std::is_floating_point<U>::value && std::is_unsigned<U>::value && (sizeof(U) <= sizeof(unsigned long)), handle>::type type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >::cast ( U  src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 1080 of file cast.h.

template<typename T >
template<typename U = T>
static std::enable_if<!std::is_floating_point<U>::value && std::is_signed<U>::value && (sizeof(U) > sizeof(long)), handle>::type type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >::cast ( U  src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 1086 of file cast.h.

template<typename T >
template<typename U = T>
static std::enable_if<!std::is_floating_point<U>::value && std::is_unsigned<U>::value && (sizeof(U) > sizeof(unsigned long)), handle>::type type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >::cast ( U  src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 1092 of file cast.h.

template<typename T >
bool type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >::load ( handle  src,
bool  convert 
)
inline

Definition at line 1017 of file cast.h.

template<typename T >
type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >::PYBIND11_TYPE_CASTER ( T  ,
_< std::is_integral< T >::value "int","float" 
)

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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:54