Scarab  2.8.1
Project 8 C++ Utility Library
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
pybind11::detail Namespace Reference

Namespaces

 accessor_policies
 
 constexpr_impl
 
 initimpl
 
 iterator_policies
 

Classes

class  accessor
 
struct  always_construct_holder
 
class  any_container
 
class  args_proxy
 
class  argument_loader
 Helper class which loads arguments for C++ functions called from Python. More...
 
struct  argument_record
 Internal data structure which holds metadata about a keyword argument. More...
 
struct  array_caster
 
struct  array_info
 
struct  array_info< char[N]>
 
struct  array_info< std::array< char, N > >
 
struct  array_info< std::array< T, N > >
 
struct  array_info< T[N]>
 
struct  array_info_scalar
 
struct  bools
 Compile-time all/any/none of that check the boolean value of all template types. More...
 
class  common_iterator
 
struct  compare_buffer_info
 
struct  compare_buffer_info< T, detail::enable_if_t< detail::is_pod_struct< T >::value > >
 
struct  compare_buffer_info< T, detail::enable_if_t< std::is_integral< T >::value > >
 
struct  container_traits
 
struct  copyable_holder_caster
 Type caster for holder types like std::shared_ptr, etc. More...
 
struct  deferred_type
 Defer the evaluation of type T until types Us are instantiated. More...
 
struct  descr
 
class  duration_caster
 
struct  eigen_extract_stride
 
struct  eigen_extract_stride< Eigen::Map< PlainObjectType, MapOptions, StrideType > >
 
struct  eigen_extract_stride< Eigen::Ref< PlainObjectType, Options, StrideType > >
 
struct  eigen_map_caster
 
struct  EigenConformable
 
struct  EigenProps
 
struct  embedded_module
 Python 2.7/3.x compatible version of PyImport_AppendInittab and error checks. More...
 
struct  enum_base
 
struct  exactly_one
 
struct  exactly_one< P, Default >
 
struct  field_descriptor
 
struct  function_call
 Internal data associated with a single function call. More...
 
struct  function_record
 Internal data structure which holds metadata about a bound function (signature, overloads, etc.) More...
 
class  generic_iterator
 STL iterator template used for tuple, list, sequence and dict. More...
 
class  generic_type
 Generic support for creating new Python heap types. More...
 
struct  handle_type_name
 
struct  handle_type_name< args >
 
struct  handle_type_name< array_t< T, Flags > >
 
struct  handle_type_name< bytes >
 
struct  handle_type_name< kwargs >
 
struct  has_operator_delete
 
struct  has_operator_delete< T, void_t< decltype(static_cast< void(*)(void *)>(T::operator delete))> >
 
struct  has_operator_delete_size
 
struct  has_operator_delete_size< T, void_t< decltype(static_cast< void(*)(void *, size_t)>(T::operator delete))> >
 
struct  holder_helper
 
struct  holder_helper< ref< T > >
 
struct  index_sequence
 Index sequences. More...
 
struct  instance
 The 'instance' type which needs to be standard layout (need to be able to use 'offsetof') More...
 
struct  int_to_str
 
struct  int_to_str< 0, Digits... >
 
struct  internals
 
struct  intrinsic_type
 Helper template to strip away type modifiers. More...
 
struct  intrinsic_type< const T >
 
struct  intrinsic_type< const T[N]>
 
struct  intrinsic_type< T & >
 
struct  intrinsic_type< T && >
 
struct  intrinsic_type< T * >
 
struct  intrinsic_type< T[N]>
 
struct  is_comparable
 
struct  is_comparable< T, enable_if_t< container_traits< T >::is_element &&container_traits< T >::is_comparable > >
 
struct  is_comparable< T, enable_if_t< container_traits< T >::is_pair > >
 
struct  is_comparable< T, enable_if_t< container_traits< T >::is_vector > >
 
struct  is_complex
 
struct  is_complex< std::complex< T > >
 
struct  is_copy_constructible
 
struct  is_copy_constructible< Container, enable_if_t< all_of< std::is_copy_constructible< Container >, std::is_same< typename Container::value_type &, typename Container::reference > >::value > >
 
struct  is_copy_constructible< std::pair< T1, T2 > >
 
struct  is_fmt_numeric
 
struct  is_fmt_numeric< std::complex< T >, detail::enable_if_t< std::is_floating_point< T >::value > >
 
struct  is_fmt_numeric< T, enable_if_t< std::is_arithmetic< T >::value > >
 
struct  is_holder_type
 
struct  is_holder_type< base, std::unique_ptr< base, deleter > >
 
struct  is_input_iterator
 Check if T looks like an input iterator. More...
 
struct  is_input_iterator< T, void_t< decltype(*std::declval< T & >()), decltype(++std::declval< T & >())> >
 
struct  is_instantiation
 
struct  is_instantiation< Class, Class< Us... > >
 
struct  is_new_style_constructor
 Tag for a new-style __init__ defined in detail/init.h More...
 
struct  is_std_array
 
struct  is_std_array< std::array< T, N > >
 
struct  is_template_base_of_impl
 
struct  iterator_state
 
class  kwargs_proxy
 
struct  list_caster
 
class  loader_life_support
 
struct  make_index_sequence_impl
 
struct  make_index_sequence_impl< 0, S... >
 
struct  map_caster
 
struct  move_always
 
struct  move_always< T, enable_if_t< all_of< move_is_plain_type< T >, negation< is_copy_constructible< T > >, std::is_move_constructible< T >, std::is_same< decltype(std::declval< make_caster< T >>().operator T &()), T & >>::value > >
 
struct  move_if_unreferenced
 
struct  move_if_unreferenced< T, enable_if_t< all_of< move_is_plain_type< T >, negation< move_always< T > >, std::is_move_constructible< T >, std::is_same< decltype(std::declval< make_caster< T >>().operator T &()), T & >>::value > >
 
struct  move_only_holder_caster
 
class  multi_array_iterator
 
struct  negation
 
struct  nonsimple_values_and_holders
 
struct  npy_api
 
struct  npy_format_descriptor
 
struct  npy_format_descriptor< char[N]>
 
struct  npy_format_descriptor< std::array< char, N > >
 
struct  npy_format_descriptor< T, enable_if_t< array_info< T >::is_array > >
 
struct  npy_format_descriptor< T, enable_if_t< satisfies_any_of< T, std::is_arithmetic, is_complex >::value > >
 
struct  npy_format_descriptor< T, enable_if_t< std::is_enum< T >::value > >
 
struct  npy_format_descriptor_name
 
struct  npy_format_descriptor_name< T, enable_if_t< is_complex< T >::value > >
 
struct  npy_format_descriptor_name< T, enable_if_t< std::is_floating_point< T >::value > >
 
struct  npy_format_descriptor_name< T, enable_if_t< std::is_integral< T >::value > >
 
struct  numpy_internals
 
struct  numpy_type_info
 
class  object_api
 
struct  op_
 Operator implementation generator. More...
 
struct  op_impl
 base template of operator implementations More...
 
struct  op_impl< op_abs, op_u, B, L, undefined_t >
 
struct  op_impl< op_add, op_l, B, L, R >
 
struct  op_impl< op_add, op_r, B, L, R >
 
struct  op_impl< op_and, op_l, B, L, R >
 
struct  op_impl< op_and, op_r, B, L, R >
 
struct  op_impl< op_bool, op_u, B, L, undefined_t >
 
struct  op_impl< op_eq, op_l, B, L, R >
 
struct  op_impl< op_eq, op_r, B, L, R >
 
struct  op_impl< op_float, op_u, B, L, undefined_t >
 
struct  op_impl< op_ge, op_l, B, L, R >
 
struct  op_impl< op_ge, op_r, B, L, R >
 
struct  op_impl< op_gt, op_l, B, L, R >
 
struct  op_impl< op_gt, op_r, B, L, R >
 
struct  op_impl< op_hash, op_u, B, L, undefined_t >
 
struct  op_impl< op_iadd, op_l, B, L, R >
 
struct  op_impl< op_iand, op_l, B, L, R >
 
struct  op_impl< op_ilshift, op_l, B, L, R >
 
struct  op_impl< op_imod, op_l, B, L, R >
 
struct  op_impl< op_imul, op_l, B, L, R >
 
struct  op_impl< op_int, op_u, B, L, undefined_t >
 
struct  op_impl< op_invert, op_u, B, L, undefined_t >
 
struct  op_impl< op_ior, op_l, B, L, R >
 
struct  op_impl< op_irshift, op_l, B, L, R >
 
struct  op_impl< op_isub, op_l, B, L, R >
 
struct  op_impl< op_itruediv, op_l, B, L, R >
 
struct  op_impl< op_ixor, op_l, B, L, R >
 
struct  op_impl< op_le, op_l, B, L, R >
 
struct  op_impl< op_le, op_r, B, L, R >
 
struct  op_impl< op_lshift, op_l, B, L, R >
 
struct  op_impl< op_lshift, op_r, B, L, R >
 
struct  op_impl< op_lt, op_l, B, L, R >
 
struct  op_impl< op_lt, op_r, B, L, R >
 
struct  op_impl< op_mod, op_l, B, L, R >
 
struct  op_impl< op_mod, op_r, B, L, R >
 
struct  op_impl< op_mul, op_l, B, L, R >
 
struct  op_impl< op_mul, op_r, B, L, R >
 
struct  op_impl< op_ne, op_l, B, L, R >
 
struct  op_impl< op_ne, op_r, B, L, R >
 
struct  op_impl< op_neg, op_u, B, L, undefined_t >
 
struct  op_impl< op_or, op_l, B, L, R >
 
struct  op_impl< op_or, op_r, B, L, R >
 
struct  op_impl< op_pos, op_u, B, L, undefined_t >
 
struct  op_impl< op_rshift, op_l, B, L, R >
 
struct  op_impl< op_rshift, op_r, B, L, R >
 
struct  op_impl< op_sub, op_l, B, L, R >
 
struct  op_impl< op_sub, op_r, B, L, R >
 
struct  op_impl< op_truediv, op_l, B, L, R >
 
struct  op_impl< op_truediv, op_r, B, L, R >
 
struct  op_impl< op_xor, op_l, B, L, R >
 
struct  op_impl< op_xor, op_r, B, L, R >
 
struct  optional_caster
 
class  OstreamRedirect
 
struct  overload_cast_impl
 
struct  overload_hash
 
struct  overload_unused
 
struct  pack_element
 Return the Nth element from the parameter pack. More...
 
struct  pack_element< 0, T, Ts... >
 
struct  process_attribute
 
struct  process_attribute< arg >
 Process a keyword argument attribute (without a default value) More...
 
struct  process_attribute< arg_v >
 Process a keyword argument attribute (with a default value) More...
 
struct  process_attribute< arithmetic >
 Process an 'arithmetic' attribute for enums (does nothing here) More...
 
struct  process_attribute< base< T > >
 Process a parent class attribute (deprecated, does not support multiple inheritance) More...
 
struct  process_attribute< buffer_protocol >
 
struct  process_attribute< call_guard< Ts... > >
 
struct  process_attribute< char * >
 
struct  process_attribute< const char * >
 Process an attribute specifying the function's docstring (provided as a C-style string) More...
 
struct  process_attribute< doc >
 Process an attribute specifying the function's docstring. More...
 
struct  process_attribute< dynamic_attr >
 
struct  process_attribute< is_method >
 Process an attribute which indicates that this function is a method. More...
 
struct  process_attribute< is_new_style_constructor >
 
struct  process_attribute< is_operator >
 Process an attribute which indicates that this function is an operator. More...
 
struct  process_attribute< keep_alive< Nurse, Patient > >
 
struct  process_attribute< metaclass >
 
struct  process_attribute< module_local >
 
struct  process_attribute< multiple_inheritance >
 Process a multiple inheritance attribute. More...
 
struct  process_attribute< name >
 Process an attribute specifying the function's name. More...
 
struct  process_attribute< return_value_policy >
 Process an attribute indicating the function's return value policy. More...
 
struct  process_attribute< scope >
 Process an attribute which indicates the parent scope of a method. More...
 
struct  process_attribute< sibling >
 Process an attribute which indicates that this is an overloaded function associated with a given sibling. More...
 
struct  process_attribute< T, enable_if_t< is_pyobject< T >::value > >
 Process a parent class attribute. Single inheritance only (class_ itself already guarantees that) More...
 
struct  process_attribute_default
 
struct  process_attributes
 Recursively iterate over variadic template arguments. More...
 
struct  PyArray_Proxy
 
struct  PyArrayDescr_Proxy
 
struct  pyobject_caster
 
struct  pyobject_caster< array_t< T, ExtraFlags > >
 
class  pyobject_tag
 Tag and check to identify a class which implements the Python object API. More...
 
class  pythonbuf
 
struct  PyVoidScalarObject_Proxy
 
struct  remove_class
 Strip the class from a method type. More...
 
struct  remove_class< R(C::*)(A...) const >
 
struct  remove_class< R(C::*)(A...)>
 
struct  return_value_policy_override
 
struct  return_value_policy_override< Return, detail::enable_if_t< std::is_base_of< type_caster_generic, make_caster< Return > >::value, void > >
 
struct  same_size
 
struct  select_indices_impl
 Make an index sequence of the indices of true arguments. More...
 
struct  select_indices_impl< index_sequence< IPrev... >, I, B, Bs... >
 
struct  self_t
 
struct  set_caster
 
class  simple_collector
 
struct  string_caster
 
struct  strip_function_object
 
class  tuple_caster
 
class  type_caster
 
struct  type_caster< ArgAlwaysConverts >
 
struct  type_caster< ArgInspector1 >
 
struct  type_caster< ArgInspector2 >
 
class  type_caster< bool >
 
struct  type_caster< CharT, enable_if_t< is_std_char_type< CharT >::value > >
 
struct  type_caster< DestructionTester >
 
struct  type_caster< std::array< Type, Size > >
 
struct  type_caster< std::basic_string< CharT, Traits, Allocator >, enable_if_t< is_std_char_type< CharT >::value > >
 
class  type_caster< std::chrono::duration< Rep, Period > >
 
class  type_caster< std::chrono::time_point< Clock, Duration > >
 
class  type_caster< std::chrono::time_point< std::chrono::system_clock, Duration > >
 
class  type_caster< std::complex< T > >
 
struct  type_caster< std::deque< Type, Alloc > >
 
struct  type_caster< std::function< Return(Args...)> >
 
struct  type_caster< std::list< Type, Alloc > >
 
struct  type_caster< std::map< Key, Value, Compare, Alloc > >
 
class  type_caster< std::nullptr_t >
 
class  type_caster< std::pair< T1, T2 > >
 
class  type_caster< std::reference_wrapper< type > >
 
struct  type_caster< std::set< Key, Compare, Alloc > >
 
class  type_caster< std::shared_ptr< T > >
 Specialize for the common std::shared_ptr, so users don't need to. More...
 
class  type_caster< std::tuple< Ts... > >
 
class  type_caster< std::unique_ptr< type, deleter > >
 
struct  type_caster< std::unordered_map< Key, Value, Hash, Equal, Alloc > >
 
struct  type_caster< std::unordered_set< Key, Hash, Equal, Alloc > >
 
struct  type_caster< std::valarray< Type > >
 
struct  type_caster< std::vector< Type, Alloc > >
 
class  type_caster< T, enable_if_t< is_pyobject< T >::value > >
 
struct  type_caster< T, enable_if_t< std::is_arithmetic< T >::value &&!is_std_char_type< T >::value > >
 
struct  type_caster< Type, enable_if_t< is_eigen_dense_map< Type >::value > >
 
struct  type_caster< Type, enable_if_t< is_eigen_dense_plain< Type >::value > >
 
struct  type_caster< Type, enable_if_t< is_eigen_other< Type >::value > >
 
struct  type_caster< Type, enable_if_t< is_eigen_sparse< Type >::value > >
 
struct  type_caster< unchecked_mutable_reference< T, Dim > >
 
struct  type_caster< unchecked_reference< T, Dim > >
 
class  type_caster< value_and_holder >
 
class  type_caster< void >
 
class  type_caster< void_type >
 
class  type_caster_base
 Generic type caster for objects stored on the heap. More...
 
class  type_caster_generic
 
struct  type_equal_to
 
struct  type_hash
 
struct  type_info
 
struct  type_list
 Helper template which holds a list of types. More...
 
struct  type_record
 Special data structure which (temporarily) holds metadata about a bound class. More...
 
class  unchecked_mutable_reference
 
class  unchecked_reference
 
struct  undefined_t
 Type for an unused type slot. More...
 
class  unpacking_collector
 Helper class which collects positional, keyword, * and ** arguments for a Python function call. More...
 
struct  value >>
 
struct  value_and_holder
 
struct  values_and_holders
 
struct  variant_caster
 Generic variant caster. More...
 
struct  variant_caster< V< Ts... > >
 
struct  variant_caster_visitor
 Visit a variant and cast any found type to Python. More...
 
struct  vector_has_data_and_format
 
struct  vector_has_data_and_format< Vector, enable_if_t< std::is_same< decltype(format_descriptor< typename Vector::value_type >::format(), std::declval< Vector >().data()), typename Vector::value_type * >::value > >
 
struct  vectorize_arg
 
struct  vectorize_helper
 
struct  visit_helper
 
struct  void_caster
 
struct  void_t_impl
 
struct  void_type
 Helper type to replace 'void' in some expressions. More...
 

Typedefs

template<typename T >
using is_call_guard = is_instantiation< call_guard, T >
 
template<typename... Extra>
using extract_guard_t = typename exactly_one_t< is_call_guard, call_guard<>, Extra... >::type
 Extract the type from the first call_guard in Extras... (or void_type if none found) More...
 
template<typename T >
using cast_op_type = conditional_t< std::is_pointer< remove_reference_t< T > >::value, typename std::add_pointer< intrinsic_t< T > >::type, typename std::add_lvalue_reference< intrinsic_t< T > >::type >
 
template<typename T >
using movable_cast_op_type = conditional_t< std::is_pointer< typename std::remove_reference< T >::type >::value, typename std::add_pointer< intrinsic_t< T > >::type, conditional_t< std::is_rvalue_reference< T >::value, typename std::add_rvalue_reference< intrinsic_t< T > >::type, typename std::add_lvalue_reference< intrinsic_t< T > >::type > >
 
template<typename type >
using make_caster = type_caster< intrinsic_t< type > >
 
template<typename CharT >
using is_std_char_type = any_of< std::is_same< CharT, char >, std::is_same< CharT, char16_t >, std::is_same< CharT, char32_t >, std::is_same< CharT, wchar_t > >
 
template<typename type , typename holder_type >
using type_caster_holder = conditional_t< is_copy_constructible< holder_type >::value, copyable_holder_caster< type, holder_type >, move_only_holder_caster< type, holder_type > >
 
template<typename T >
using move_is_plain_type = satisfies_none_of< T, std::is_void, std::is_pointer, std::is_reference, std::is_const >
 
template<typename T >
using move_never = none_of< move_always< T >, move_if_unreferenced< T > >
 
template<typename type >
using cast_is_temporary_value_reference = bool_constant<(std::is_reference< type >::value||std::is_pointer< type >::value) &&!std::is_base_of< type_caster_generic, make_caster< type > >::value &&!std::is_same< intrinsic_t< type >, void >::value >
 
template<typename ret_type >
using overload_caster_t = conditional_t< cast_is_temporary_value_reference< ret_type >::value, make_caster< ret_type >, overload_unused >
 
template<bool B, typename T = void>
using enable_if_t = typename std::enable_if< B, T >::type
 from cpp_future import (convenient aliases from C++14/17) More...
 
template<bool B, typename T , typename F >
using conditional_t = typename std::conditional< B, T, F >::type
 
template<typename T >
using remove_cv_t = typename std::remove_cv< T >::type
 
template<typename T >
using remove_reference_t = typename std::remove_reference< T >::type
 
template<size_t N>
using make_index_sequence = typename make_index_sequence_impl< N >::type
 
template<bool... Bs>
using select_indices = typename select_indices_impl< index_sequence<>, 0, Bs... >::type
 
template<bool B>
using bool_constant = std::integral_constant< bool, B >
 Backports of std::bool_constant and std::negation to accommodate older compilers. More...
 
template<typename... Ts>
using void_t = typename void_t_impl< Ts... >::type
 
template<class... Ts>
using all_of = std::is_same< bools< Ts::value..., true >, bools< true, Ts::value... > >
 
template<class... Ts>
using any_of = negation< all_of< negation< Ts >... > >
 
template<class... Ts>
using none_of = negation< any_of< Ts... > >
 
template<class T , template< class > class... Predicates>
using satisfies_all_of = all_of< Predicates< T >... >
 
template<class T , template< class > class... Predicates>
using satisfies_any_of = any_of< Predicates< T >... >
 
template<class T , template< class > class... Predicates>
using satisfies_none_of = none_of< Predicates< T >... >
 
template<typename T >
using intrinsic_t = typename intrinsic_type< T >::type
 
template<template< typename > class Predicate, typename Default , typename... Ts>
using exactly_one_t = typename exactly_one< Predicate, Default, Ts... >::type
 
template<typename T , typename... Us>
using deferred_t = typename deferred_type< T, Us... >::type
 
template<typename Base , typename Derived >
using is_strict_base_of = bool_constant< std::is_base_of< Base, Derived >::value &&!std::is_same< Base, Derived >::value >
 
template<typename Base , typename Derived >
using is_accessible_base_of = bool_constant< std::is_base_of< Base, Derived >::value &&std::is_convertible< Derived *, Base * >::value >
 
template<template< typename... > class Base, typename T >
using is_template_base_of = decltype(is_template_base_of_impl< Base >::check((intrinsic_t< T > *) nullptr))
 
template<typename T >
using is_shared_ptr = is_instantiation< std::shared_ptr, T >
 Check if T is std::shared_ptr<U> where U can be anything. More...
 
template<typename T >
using is_function_pointer = bool_constant< std::is_pointer< T >::value &&std::is_function< typename std::remove_pointer< T >::type >::value >
 
template<typename Function , typename F = remove_reference_t<Function>>
using function_signature_t = conditional_t< std::is_function< F >::value, F, typename conditional_t< std::is_pointer< F >::value||std::is_member_pointer< F >::value, std::remove_pointer< F >, strip_function_object< F > >::type >
 
template<typename T >
using is_lambda = satisfies_none_of< remove_reference_t< T >, std::is_function, std::is_pointer, std::is_member_pointer >
 
using expand_side_effects = bool[]
 Apply a function over each element of a parameter pack. More...
 
template<typename value_type >
using type_map = std::unordered_map< std::type_index, value_type, type_hash, type_equal_to >
 
using EigenIndex = EIGEN_DEFAULT_DENSE_INDEX_TYPE
 
template<typename T >
using is_eigen_dense_map = all_of< is_template_base_of< Eigen::DenseBase, T >, std::is_base_of< Eigen::MapBase< T, Eigen::ReadOnlyAccessors >, T > >
 
template<typename T >
using is_eigen_mutable_map = std::is_base_of< Eigen::MapBase< T, Eigen::WriteAccessors >, T >
 
template<typename T >
using is_eigen_dense_plain = all_of< negation< is_eigen_dense_map< T > >, is_template_base_of< Eigen::PlainObjectBase, T > >
 
template<typename T >
using is_eigen_sparse = is_template_base_of< Eigen::SparseMatrixBase, T >
 
template<typename T >
using is_eigen_other = all_of< is_template_base_of< Eigen::EigenBase, T >, negation< any_of< is_eigen_dense_map< T >, is_eigen_dense_plain< T >, is_eigen_sparse< T > >> >
 
template<typename T >
using remove_all_extents_t = typename array_info< T >::type
 
template<typename T >
using is_pod_struct = all_of< std::is_standard_layout< T >, std::is_trivially_copyable< T >, satisfies_none_of< T, std::is_reference, std::is_array, is_std_array, std::is_arithmetic, is_complex, std::is_enum > >
 
template<class T >
using array_iterator = typename std::add_pointer< T >::type
 
using obj_attr_accessor = accessor< accessor_policies::obj_attr >
 
using str_attr_accessor = accessor< accessor_policies::str_attr >
 
using item_accessor = accessor< accessor_policies::generic_item >
 
using sequence_accessor = accessor< accessor_policies::sequence_item >
 
using list_accessor = accessor< accessor_policies::list_item >
 
using tuple_accessor = accessor< accessor_policies::tuple_item >
 
template<typename T >
using is_pyobject = std::is_base_of< pyobject_tag, remove_reference_t< T > >
 
using tuple_iterator = generic_iterator< iterator_policies::sequence_fast_readonly >
 
using list_iterator = generic_iterator< iterator_policies::sequence_fast_readonly >
 
using sequence_iterator = generic_iterator< iterator_policies::sequence_slow_readwrite >
 
using dict_iterator = generic_iterator< iterator_policies::dict_readonly >
 
template<typename T >
using is_keyword = std::is_base_of< arg, T >
 Python argument categories (using PEP 448 terms) More...
 
template<typename T >
using is_s_unpacking = std::is_same< args_proxy, T >
 
template<typename T >
using is_ds_unpacking = std::is_same< kwargs_proxy, T >
 
template<typename T >
using is_positional = satisfies_none_of< T, is_keyword, is_s_unpacking, is_ds_unpacking >
 
template<typename T >
using is_keyword_or_ds = satisfies_any_of< T, is_keyword, is_ds_unpacking >
 
template<typename T , typename U >
using forwarded_type = conditional_t< std::is_lvalue_reference< T >::value, remove_reference_t< U > &, remove_reference_t< U > && >
 
template<typename Vector >
using vector_needs_copy = negation< std::is_same< decltype(std::declval< Vector >()[typename Vector::size_type()]), typename Vector::value_type & > >
 

Enumerations

enum  broadcast_trivial { non_trivial, c_trivial, f_trivial }
 
enum  op_id : int {
  op_add, op_sub, op_mul, op_div,
  op_mod, op_divmod, op_pow, op_lshift,
  op_rshift, op_and, op_xor, op_or,
  op_neg, op_pos, op_abs, op_invert,
  op_int, op_long, op_float, op_str,
  op_cmp, op_gt, op_ge, op_lt,
  op_le, op_eq, op_ne, op_iadd,
  op_isub, op_imul, op_idiv, op_imod,
  op_ilshift, op_irshift, op_iand, op_ixor,
  op_ior, op_complex, op_bool, op_nonzero,
  op_repr, op_truediv, op_itruediv, op_hash
}
 Enumeration with all supported operator types. More...
 
enum  op_type : int { op_l, op_r, op_u }
 

Functions

void keep_alive_impl (size_t Nurse, size_t Patient, function_call &call, handle ret)
 
template<typename... Extra, size_t named = constexpr_sum(std::is_base_of<arg, Extra>::value...), size_t self = constexpr_sum(std::is_same<is_method, Extra>::value...)>
constexpr bool expected_num_args (size_t nargs, bool has_args, bool has_kwargs)
 Check the number of named arguments at compile time. More...
 
std::pair< decltype(internals::registered_types_py)::iterator, bool > all_type_info_get_cache (PyTypeObject *type)
 
 __attribute__ ((noinline)) inline detail
 Return the type info for a given C++ type; on lookup failure can either throw or return nullptr. More...
 
 for (handle parent :reinterpret_borrow< tuple >(t->tp_bases)) check.push_back((PyTypeObject *) parent.ptr())
 
 for (size_t i=0;i< check.size();i++)
 
const std::vector< detail::type_info * > & all_type_info (PyTypeObject *type)
 
detail::type_infoget_local_type_info (const std::type_index &tp)
 
detail::type_infoget_global_type_info (const std::type_index &tp)
 
 if (!type) return false
 
return isinstance (obj, type)
 
 for (auto it=range.first;it !=range.second;++it)
 
return handle ()
 
PyThreadState * get_thread_state_unchecked ()
 
void keep_alive_impl (handle nurse, handle patient)
 
PyObject * make_new_instance (PyTypeObject *type)
 
template<typename T >
make_caster< T >::template cast_op_type< T > cast_op (make_caster< T > &caster)
 
template<typename T >
make_caster< T >::template cast_op_type< typename std::add_rvalue_reference< T >::typecast_op (make_caster< T > &&caster)
 
template<typename T , typename SFINAE >
type_caster< T, SFINAE > & load_type (type_caster< T, SFINAE > &conv, const handle &handle)
 
template<typename T >
make_caster< T > load_type (const handle &handle)
 
template<typename T , enable_if_t<!is_pyobject< T >::value, int > >
object object_or_cast (T &&o)
 
template<typename T >
enable_if_t< cast_is_temporary_value_reference< T >::value, T > cast_ref (object &&o, make_caster< T > &caster)
 
template<typename T >
enable_if_t<!cast_is_temporary_value_reference< T >::value, T > cast_ref (object &&, overload_unused &)
 
template<typename T >
enable_if_t<!cast_is_temporary_value_reference< T >::value, T > cast_safe (object &&o)
 
template<typename T >
enable_if_t< cast_is_temporary_value_reference< T >::value, T > cast_safe (object &&)
 
template<>
void cast_safe< void > (object &&)
 
template<return_value_policy policy, typename... Args, typename = enable_if_t<all_of<is_positional<Args>...>::value>>
simple_collector< policy > collect_arguments (Args &&...args)
 Collect only positional arguments for a Python function call. More...
 
template<return_value_policy policy, typename... Args, typename = enable_if_t<!all_of<is_positional<Args>...>::value>>
unpacking_collector< policy > collect_arguments (Args &&...args)
 Collect all arguments, including keywords and unpacking (only instantiated when needed) More...
 
PyTypeObject * type_incref (PyTypeObject *type)
 
PyObject * pybind11_static_get (PyObject *self, PyObject *, PyObject *cls)
 pybind11_static_property.__get__(): Always pass the class instead of the instance. More...
 
int pybind11_static_set (PyObject *self, PyObject *obj, PyObject *value)
 pybind11_static_property.__set__(): Just like the above __get__(). More...
 
PyTypeObject * make_static_property_type ()
 
int pybind11_meta_setattro (PyObject *obj, PyObject *name, PyObject *value)
 
PyTypeObject * make_default_metaclass ()
 
void traverse_offset_bases (void *valueptr, const detail::type_info *tinfo, instance *self, bool(*f)(void *, instance *))
 
bool register_instance_impl (void *ptr, instance *self)
 
bool deregister_instance_impl (void *ptr, instance *self)
 
void register_instance (instance *self, void *valptr, const type_info *tinfo)
 
bool deregister_instance (instance *self, void *valptr, const type_info *tinfo)
 
PyObject * pybind11_object_new (PyTypeObject *type, PyObject *, PyObject *)
 
int pybind11_object_init (PyObject *self, PyObject *, PyObject *)
 
void add_patient (PyObject *nurse, PyObject *patient)
 
void clear_patients (PyObject *self)
 
void clear_instance (PyObject *self)
 
void pybind11_object_dealloc (PyObject *self)
 
PyObject * make_object_base_type (PyTypeObject *metaclass)
 
PyObject * pybind11_get_dict (PyObject *self, void *)
 dynamic_attr: Support for d = instance.__dict__. More...
 
int pybind11_set_dict (PyObject *self, PyObject *new_dict, void *)
 dynamic_attr: Support for instance.__dict__ = dict(). More...
 
int pybind11_traverse (PyObject *self, visitproc visit, void *arg)
 dynamic_attr: Allow the garbage collector to traverse the internal instance __dict__. More...
 
int pybind11_clear (PyObject *self)
 dynamic_attr: Allow the GC to clear the dictionary. More...
 
void enable_dynamic_attributes (PyHeapTypeObject *heap_type)
 Give instances of this type a __dict__ and opt into garbage collection. More...
 
int pybind11_getbuffer (PyObject *obj, Py_buffer *view, int flags)
 buffer_protocol: Fill in the view as specified by flags. More...
 
void pybind11_releasebuffer (PyObject *, Py_buffer *view)
 buffer_protocol: Release the resources of the buffer. More...
 
void enable_buffer_protocol (PyHeapTypeObject *heap_type)
 Give this type a buffer interface. More...
 
PyObject * make_new_python_type (const type_record &rec)
 
static constexpr int log2 (size_t n, int k=0)
 
static constexpr size_t size_in_ptrs (size_t s)
 
constexpr size_t instance_simple_holder_in_ptrs ()
 
constexpr size_t constexpr_sum ()
 Compile-time integer sum. More...
 
template<typename T , typename... Ts>
constexpr size_t constexpr_sum (T n, Ts... ns)
 
template<template< typename > class Predicate, typename... Ts>
constexpr int constexpr_first ()
 
template<template< typename > class Predicate, typename... Ts>
constexpr int constexpr_last ()
 Return the index of the last type in Ts which satisfies Predicate<T>, or -1 if none match. More...
 
void ignore_unused (const int *)
 Ignore that a variable is unused in compiler warnings. More...
 
template<size_t N1, size_t N2, typename... Ts1, typename... Ts2, size_t... Is1, size_t... Is2>
constexpr descr< N1+N2, Ts1..., Ts2... > plus_impl (const descr< N1, Ts1... > &a, const descr< N2, Ts2... > &b, index_sequence< Is1... >, index_sequence< Is2... >)
 
template<size_t N1, size_t N2, typename... Ts1, typename... Ts2>
constexpr descr< N1+N2, Ts1..., Ts2... > operator+ (const descr< N1, Ts1... > &a, const descr< N2, Ts2... > &b)
 
template<size_t N>
constexpr descr< N - 1 > _ (char const(&text)[N])
 
constexpr descr< 0 > _ (char const(&)[1])
 
template<bool B, size_t N1, size_t N2>
constexpr enable_if_t< B, descr< N1 - 1 > > _ (char const(&text1)[N1], char const(&)[N2])
 
template<bool B, size_t N1, size_t N2>
constexpr enable_if_t<!B, descr< N2 - 1 > > _ (char const(&)[N1], char const(&text2)[N2])
 
template<bool B, typename T1 , typename T2 >
constexpr enable_if_t< B, T1 > _ (const T1 &d, const T2 &)
 
template<bool B, typename T1 , typename T2 >
constexpr enable_if_t<!B, T2 > _ (const T1 &, const T2 &d)
 
template<size_t Size>
auto constexpr _ () -> decltype(int_to_str< Size/10, Size % 10 >::digits)
 
template<typename Type >
constexpr descr< 1, Type > _ ()
 
constexpr descr< 0 > concat ()
 
template<size_t N, typename... Ts>
constexpr descr< N, Ts... > concat (const descr< N, Ts... > &descr)
 
template<size_t N, typename... Ts, typename... Args>
constexpr auto concat (const descr< N, Ts... > &d, const Args &...args) -> decltype(std::declval< descr< N+2, Ts... >>()+concat(args...))
 
template<size_t N, typename... Ts>
constexpr descr< N+2, Ts... > type_descr (const descr< N, Ts... > &descr)
 
bool same_type (const std::type_info &lhs, const std::type_info &rhs)
 
internals **& get_internals_pp ()
 
void translate_exception (std::exception_ptr p)
 
void translate_local_exception (std::exception_ptr p)
 
 __attribute__ ((noinline)) inline internals &get_internals()
 Return a reference to the current internals data. More...
 
type_map< type_info * > & registered_local_types_cpp ()
 Works like internals.registered_types_cpp, but for module-local registered types: More...
 
template<typename... Args>
const char * c_str (Args &&...args)
 
void erase_all (std::string &string, const std::string &search)
 Erase all occurrences of a substring. More...
 
template<typename props >
handle eigen_array_cast (typename props::Type const &src, handle base=handle(), bool writeable=true)
 
template<typename props , typename Type >
handle eigen_ref_array (Type &src, handle parent=none())
 
template<typename props , typename Type , typename = enable_if_t<is_eigen_dense_plain<Type>::value>>
handle eigen_encapsulate (Type *src)
 
numpy_internalsget_numpy_internals ()
 
template<typename Concrete , typename... Check, typename... Int>
constexpr int platform_lookup (Int... codes)
 
PyArray_Proxyarray_proxy (void *ptr)
 
const PyArray_Proxyarray_proxy (const void *ptr)
 
PyArrayDescr_Proxyarray_descriptor_proxy (PyObject *ptr)
 
const PyArrayDescr_Proxyarray_descriptor_proxy (const PyObject *ptr)
 
bool check_flags (const void *ptr, int flag)
 
template<ssize_t Dim = 0, typename Strides >
ssize_t byte_offset_unsafe (const Strides &)
 
template<ssize_t Dim = 0, typename Strides , typename... Ix>
ssize_t byte_offset_unsafe (const Strides &strides, ssize_t i, Ix... index)
 
template<class T >
array_iterator< T > array_begin (const buffer_info &buffer)
 
template<class T >
array_iterator< T > array_end (const buffer_info &buffer)
 
template<size_t N>
broadcast_trivial broadcast (const std::array< buffer_info, N > &buffers, ssize_t &ndim, std::vector< ssize_t > &shape)
 
template<typename Func , typename Return , typename... Args>
vectorize_helper< Func, Return, Args... > vectorize_extractor (const Func &f, Return(*)(Args ...))
 
self_t __self ()
 Don't warn about an unused variable. More...
 
op_< op_sub, op_l, self_t, self_toperator- (const self_t &, const self_t &)
 
template<typename T >
op_< op_sub, op_l, self_t, T > operator- (const self_t &, const T &)
 
template<typename T >
op_< op_sub, op_r, T, self_toperator- (const T &, const self_t &)
 
op_< op_add, op_l, self_t, self_toperator+ (const self_t &, const self_t &)
 
template<typename T >
op_< op_add, op_l, self_t, T > operator+ (const self_t &, const T &)
 
template<typename T >
op_< op_add, op_r, T, self_toperator+ (const T &, const self_t &)
 
op_< op_mul, op_l, self_t, self_toperator* (const self_t &, const self_t &)
 
template<typename T >
op_< op_mul, op_l, self_t, T > operator* (const self_t &, const T &)
 
template<typename T >
op_< op_mul, op_r, T, self_toperator* (const T &, const self_t &)
 
op_< op_truediv, op_l, self_t, self_toperator/ (const self_t &, const self_t &)
 
template<typename T >
op_< op_truediv, op_l, self_t, T > operator/ (const self_t &, const T &)
 
template<typename T >
op_< op_truediv, op_r, T, self_toperator/ (const T &, const self_t &)
 
op_< op_mod, op_l, self_t, self_toperator% (const self_t &, const self_t &)
 
template<typename T >
op_< op_mod, op_l, self_t, T > operator% (const self_t &, const T &)
 
template<typename T >
op_< op_mod, op_r, T, self_toperator% (const T &, const self_t &)
 
op_< op_lshift, op_l, self_t, self_toperator<< (const self_t &, const self_t &)
 
template<typename T >
op_< op_lshift, op_l, self_t, T > operator<< (const self_t &, const T &)
 
template<typename T >
op_< op_lshift, op_r, T, self_toperator<< (const T &, const self_t &)
 
op_< op_rshift, op_l, self_t, self_toperator>> (const self_t &, const self_t &)
 
template<typename T >
op_< op_rshift, op_l, self_t, T > operator>> (const self_t &, const T &)
 
template<typename T >
op_< op_rshift, op_r, T, self_toperator>> (const T &, const self_t &)
 
op_< op_and, op_l, self_t, self_toperator & (const self_t &, const self_t &)
 
template<typename T >
op_< op_and, op_l, self_t, T > operator & (const self_t &, const T &)
 
template<typename T >
op_< op_and, op_r, T, self_toperator & (const T &, const self_t &)
 
op_< op_xor, op_l, self_t, self_toperator^ (const self_t &, const self_t &)
 
template<typename T >
op_< op_xor, op_l, self_t, T > operator^ (const self_t &, const T &)
 
template<typename T >
op_< op_xor, op_r, T, self_toperator^ (const T &, const self_t &)
 
op_< op_eq, op_l, self_t, self_toperator== (const self_t &, const self_t &)
 
template<typename T >
op_< op_eq, op_l, self_t, T > operator== (const self_t &, const T &)
 
template<typename T >
op_< op_eq, op_r, T, self_toperator== (const T &, const self_t &)
 
op_< op_ne, op_l, self_t, self_toperator!= (const self_t &, const self_t &)
 
template<typename T >
op_< op_ne, op_l, self_t, T > operator!= (const self_t &, const T &)
 
template<typename T >
op_< op_ne, op_r, T, self_toperator!= (const T &, const self_t &)
 
op_< op_or, op_l, self_t, self_toperator| (const self_t &, const self_t &)
 
template<typename T >
op_< op_or, op_l, self_t, T > operator| (const self_t &, const T &)
 
template<typename T >
op_< op_or, op_r, T, self_toperator| (const T &, const self_t &)
 
op_< op_gt, op_l, self_t, self_toperator> (const self_t &, const self_t &)
 
template<typename T >
op_< op_gt, op_l, self_t, T > operator> (const self_t &, const T &)
 
template<typename T >
op_< op_gt, op_r, T, self_toperator> (const T &, const self_t &)
 
op_< op_ge, op_l, self_t, self_toperator>= (const self_t &, const self_t &)
 
template<typename T >
op_< op_ge, op_l, self_t, T > operator>= (const self_t &, const T &)
 
template<typename T >
op_< op_ge, op_r, T, self_toperator>= (const T &, const self_t &)
 
op_< op_lt, op_l, self_t, self_toperator< (const self_t &, const self_t &)
 
template<typename T >
op_< op_lt, op_l, self_t, T > operator< (const self_t &, const T &)
 
template<typename T >
op_< op_lt, op_r, T, self_toperator< (const T &, const self_t &)
 
op_< op_le, op_l, self_t, self_toperator<= (const self_t &, const self_t &)
 
template<typename T >
op_< op_le, op_l, self_t, T > operator<= (const self_t &, const T &)
 
template<typename T >
op_< op_le, op_r, T, self_toperator<= (const T &, const self_t &)
 
template<typename T >
op_< op_iadd, op_l, self_t, T > operator+= (const self_t &, const T &)
 
template<typename T >
op_< op_isub, op_l, self_t, T > operator-= (const self_t &, const T &)
 
template<typename T >
op_< op_imul, op_l, self_t, T > operator*= (const self_t &, const T &)
 
template<typename T >
op_< op_itruediv, op_l, self_t, T > operator/= (const self_t &, const T &)
 
template<typename T >
op_< op_imod, op_l, self_t, T > operator%= (const self_t &, const T &)
 
template<typename T >
op_< op_ilshift, op_l, self_t, T > operator<<= (const self_t &, const T &)
 
template<typename T >
op_< op_irshift, op_l, self_t, T > operator>>= (const self_t &, const T &)
 
template<typename T >
op_< op_iand, op_l, self_t, T > operator &= (const self_t &, const T &)
 
template<typename T >
op_< op_ixor, op_l, self_t, T > operator^= (const self_t &, const T &)
 
template<typename T >
op_< op_ior, op_l, self_t, T > operator|= (const self_t &, const T &)
 
op_< op_neg, op_u, self_t, undefined_toperator- (const self_t &)
 
op_< op_pos, op_u, self_t, undefined_toperator+ (const self_t &)
 
op_< op_abs, op_u, self_t, undefined_tabs (const self_t &)
 
op_< op_hash, op_u, self_t, undefined_thash (const self_t &)
 
op_< op_invert, op_u, self_t, undefined_toperator~ (const self_t &)
 
op_< op_bool, op_u, self_t, undefined_toperator! (const self_t &)
 
op_< op_int, op_u, self_t, undefined_tint_ (const self_t &)
 
op_< op_float, op_u, self_t, undefined_tfloat_ (const self_t &)
 
template<typename T , typename = void_t<decltype(static_cast<void *(*)(size_t)>(T::operator new))>>
void set_operator_new (type_record *r)
 Set the pointer to operator new if it exists. The cast is needed because it can be overloaded. More...
 
template<typename >
void set_operator_new (...)
 
template<typename T , enable_if_t< has_operator_delete< T >::value, int > = 0>
void call_operator_delete (T *p, size_t, size_t)
 Call class-specific delete if it exists or global otherwise. Can also be an overload set. More...
 
void call_operator_delete (void *p, size_t s, size_t a)
 
 keep_alive_impl (get_arg(Nurse), get_arg(Patient))
 
template<typename CppException >
exception< CppException > & get_exception_object ()
 
 if (kwargs.contains("file"))
 
 write (line)
 
 write (kwargs.contains("end") ? kwargs["end"] :cast("\))
 
 if (kwargs.contains("flush") &&kwargs["flush"].cast< bool >()) file.attr("flush")()
 
bool isinstance_generic (handle obj, const std::type_info &tp)
 
std::string error_string ()
 
handle get_function (handle value)
 
template<typename T , enable_if_t< is_pyobject< T >::value, int > = 0>
auto object_or_cast (T &&o) -> decltype(std::forward< T >(o))
 
handle object_or_cast (PyObject *ptr)
 
bool PyIterable_Check (PyObject *obj)
 
bool PyNone_Check (PyObject *o)
 
bool PyUnicode_Check_Permissive (PyObject *o)
 
bool PyStaticMethod_Check (PyObject *o)
 
template<typename Unsigned >
Unsigned as_unsigned (PyObject *o)
 
template<typename T , typename U >
forwarded_type< T, U > forward_like (U &&u)
 
template<typename , typename , typename... Args>
void vector_if_copy_constructible (const Args &...)
 
template<typename , typename , typename... Args>
void vector_if_equal_operator (const Args &...)
 
template<typename , typename , typename... Args>
void vector_if_insertion_operator (const Args &...)
 
template<typename , typename , typename... Args>
void vector_modifiers (const Args &...)
 
template<typename Vector , typename Class_ >
void vector_if_copy_constructible (enable_if_t< is_copy_constructible< Vector >::value, Class_ > &cl)
 
template<typename Vector , typename Class_ >
void vector_if_equal_operator (enable_if_t< is_comparable< Vector >::value, Class_ > &cl)
 
template<typename Vector , typename Class_ >
void vector_modifiers (enable_if_t< is_copy_constructible< typename Vector::value_type >::value, Class_ > &cl)
 
template<typename Vector , typename Class_ >
void vector_accessor (enable_if_t<!vector_needs_copy< Vector >::value, Class_ > &cl)
 
template<typename Vector , typename Class_ >
void vector_accessor (enable_if_t< vector_needs_copy< Vector >::value, Class_ > &cl)
 
template<typename Vector , typename Class_ >
auto vector_if_insertion_operator (Class_ &cl, std::string const &name) -> decltype(std::declval< std::ostream &>()<< std::declval< typename Vector::value_type >(), void())
 
template<typename Vector , typename Class_ , typename... Args>
enable_if_t< detail::any_of< std::is_same< Args, buffer_protocol >... >::value > vector_buffer (Class_ &cl)
 
template<typename Vector , typename Class_ , typename... Args>
enable_if_t<!detail::any_of< std::is_same< Args, buffer_protocol >... >::value > vector_buffer (Class_ &)
 
template<typename , typename , typename... Args>
void map_if_insertion_operator (const Args &...)
 
template<typename , typename , typename... Args>
void map_assignment (const Args &...)
 
template<typename Map , typename Class_ >
void map_assignment (enable_if_t< std::is_copy_assignable< typename Map::mapped_type >::value, Class_ > &cl)
 
template<typename Map , typename Class_ >
void map_assignment (enable_if_t< !std::is_copy_assignable< typename Map::mapped_type >::value &&is_copy_constructible< typename Map::mapped_type >::value, Class_ > &cl)
 
template<typename Map , typename Class_ >
auto map_if_insertion_operator (Class_ &cl, std::string const &name) -> decltype(std::declval< std::ostream &>()<< std::declval< typename Map::key_type >()<< std::declval< typename Map::mapped_type >(), void())
 

Variables

std::vector< type_info * > & bases
 
auto const & type_dict = get_internals().registered_types_py
 
const std::type_info & tp
 
const detail::type_infotype
 
auto range = instances.equal_range(ptr)
 
const std::type_info & tinfo
 
const std::type_info ssize_t itemsize
 
const std::type_info ssize_t bool(* direct_converter )(PyObject *, void *&))
 
static const self_t self = self_t()
 
size_t Patient
 
size_t function_callcall
 
size_t function_call handle ret
 
dict kwargs
 
auto sep = kwargs.contains("sep") ? kwargs["sep"] : cast(" ")
 
auto line = sep.attr("join")(strings)
 
object file
 
 else
 

Typedef Documentation

◆ all_of

using all_of = std::is_same< bools<Ts::value..., true>, bools<true, Ts::value...> >

Definition at line 487 of file detail/common.h.

◆ any_of

using any_of = negation<all_of<negation<Ts>...> >

Definition at line 488 of file detail/common.h.

◆ array_iterator

using array_iterator = typename std::add_pointer<T>::type

Definition at line 1268 of file numpy.h.

◆ bool_constant

using bool_constant = std::integral_constant<bool, B>

Backports of std::bool_constant and std::negation to accommodate older compilers.

Definition at line 473 of file detail/common.h.

◆ cast_is_temporary_value_reference

using cast_is_temporary_value_reference = bool_constant< (std::is_reference<type>::value || std::is_pointer<type>::value) && !std::is_base_of<type_caster_generic, make_caster<type> >::value && !std::is_same<intrinsic_t<type>, void>::value >

Definition at line 1618 of file cast.h.

◆ cast_op_type

using cast_op_type = conditional_t<std::is_pointer<remove_reference_t<T> >::value, typename std::add_pointer<intrinsic_t<T> >::type, typename std::add_lvalue_reference<intrinsic_t<T> >::type>

Determine suitable casting operator for pointer-or-lvalue-casting type casters. The type caster needs to provide operator T*() and operator T&() operators.

If the type supports moving the value away via an operator T&&() && method, it should use movable_cast_op_type instead.

Definition at line 752 of file cast.h.

◆ conditional_t

using conditional_t = typename std::conditional<B, T, F>::type

Definition at line 450 of file detail/common.h.

◆ deferred_t

using deferred_t = typename deferred_type<T, Us...>::type

Definition at line 575 of file detail/common.h.

◆ dict_iterator

Definition at line 725 of file pytypes.h.

◆ EigenIndex

using EigenIndex = EIGEN_DEFAULT_DENSE_INDEX_TYPE

Definition at line 56 of file eigen.h.

◆ enable_if_t

using enable_if_t = typename std::enable_if<B, T>::type

from cpp_future import (convenient aliases from C++14/17)

Definition at line 449 of file detail/common.h.

◆ exactly_one_t

using exactly_one_t = typename exactly_one<Predicate, Default, Ts...>::type

Definition at line 571 of file detail/common.h.

◆ expand_side_effects

using expand_side_effects = bool[]

Apply a function over each element of a parameter pack.

Definition at line 650 of file detail/common.h.

◆ extract_guard_t

using extract_guard_t = typename exactly_one_t<is_call_guard, call_guard<>, Extra...>::type

Extract the type from the first call_guard in Extras... (or void_type if none found)

Definition at line 482 of file attr.h.

◆ forwarded_type

using forwarded_type = conditional_t< std::is_lvalue_reference<T>::value, remove_reference_t<U> &, remove_reference_t<U> &&>

Extracts an const lvalue reference or rvalue reference for U based on the type of T (e.g. for forwarding a container element). Typically used indirect via forwarded_type(), below.

Definition at line 58 of file stl.h.

◆ function_signature_t

using function_signature_t = conditional_t< std::is_function<F>::value, F, typename conditional_t< std::is_pointer<F>::value || std::is_member_pointer<F>::value, std::remove_pointer<F>, strip_function_object<F> >::type >

Definition at line 635 of file detail/common.h.

◆ intrinsic_t

using intrinsic_t = typename intrinsic_type<T>::type

Definition at line 514 of file detail/common.h.

◆ is_accessible_base_of

using is_accessible_base_of = bool_constant< std::is_base_of<Base, Derived>::value && std::is_convertible<Derived *, Base *>::value>

Like is_base_of, but also requires that the base type is accessible (i.e. that a Derived pointer can be converted to a Base pointer)

Definition at line 585 of file detail/common.h.

◆ is_call_guard

Definition at line 478 of file attr.h.

◆ is_ds_unpacking

using is_ds_unpacking = std::is_same<kwargs_proxy, T>

Definition at line 761 of file pytypes.h.

◆ is_eigen_dense_map

using is_eigen_dense_map = all_of<is_template_base_of<Eigen::DenseBase, T>, std::is_base_of<Eigen::MapBase<T, Eigen::ReadOnlyAccessors>, T> >

Definition at line 60 of file eigen.h.

◆ is_eigen_dense_plain

using is_eigen_dense_plain = all_of<negation<is_eigen_dense_map<T> >, is_template_base_of<Eigen::PlainObjectBase, T> >

Definition at line 62 of file eigen.h.

◆ is_eigen_mutable_map

using is_eigen_mutable_map = std::is_base_of<Eigen::MapBase<T, Eigen::WriteAccessors>, T>

Definition at line 61 of file eigen.h.

◆ is_eigen_other

Definition at line 71 of file eigen.h.

◆ is_eigen_sparse

using is_eigen_sparse = is_template_base_of<Eigen::SparseMatrixBase, T>

Definition at line 63 of file eigen.h.

◆ is_function_pointer

using is_function_pointer = bool_constant< std::is_pointer<T>::value && std::is_function<typename std::remove_pointer<T>::type>::value>

Definition at line 619 of file detail/common.h.

◆ is_keyword

using is_keyword = std::is_base_of<arg, T>

Python argument categories (using PEP 448 terms)

Definition at line 759 of file pytypes.h.

◆ is_keyword_or_ds

Definition at line 765 of file pytypes.h.

◆ is_lambda

using is_lambda = satisfies_none_of<remove_reference_t<T>, std::is_function, std::is_pointer, std::is_member_pointer>

Returns true if the type looks like a lambda: that is, isn't a function, pointer or member pointer. Note that this can catch all sorts of other things, too; this is intended to be used in a place where passing a lambda makes sense.

Definition at line 641 of file detail/common.h.

◆ is_pod_struct

using is_pod_struct = all_of< std::is_standard_layout<T>, std::is_trivially_copyable<T>, satisfies_none_of<T, std::is_reference, std::is_array, is_std_array, std::is_arithmetic, is_complex, std::is_enum> >

Definition at line 324 of file numpy.h.

◆ is_positional

Definition at line 764 of file pytypes.h.

◆ is_pyobject

using is_pyobject = std::is_base_of<pyobject_tag, remove_reference_t<T> >

Definition at line 47 of file pytypes.h.

◆ is_s_unpacking

using is_s_unpacking = std::is_same<args_proxy, T>

Definition at line 760 of file pytypes.h.

◆ is_shared_ptr

using is_shared_ptr = is_instantiation<std::shared_ptr, T>

Check if T is std::shared_ptr<U> where U can be anything.

Definition at line 610 of file detail/common.h.

◆ is_std_char_type

using is_std_char_type = any_of< std::is_same<CharT, char>, std::is_same<CharT, char16_t>, std::is_same<CharT, char32_t>, std::is_same<CharT, wchar_t> >

Definition at line 967 of file cast.h.

◆ is_strict_base_of

using is_strict_base_of = bool_constant< std::is_base_of<Base, Derived>::value && !std::is_same<Base, Derived>::value>

Like is_base_of, but requires a strict base (i.e. is_strict_base_of<T, T>::value == false, unlike std::is_base_of)

Definition at line 580 of file detail/common.h.

◆ is_template_base_of

using is_template_base_of = decltype(is_template_base_of_impl<Base>::check((intrinsic_t<T>*)nullptr))

Check if a template is the base of a type. For example: is_template_base_of<Base, T> is true if struct T : Base<U> {} where U can be anything

Definition at line 597 of file detail/common.h.

◆ item_accessor

Definition at line 40 of file pytypes.h.

◆ list_accessor

Definition at line 42 of file pytypes.h.

◆ list_iterator

Definition at line 718 of file pytypes.h.

◆ make_caster

Definition at line 910 of file cast.h.

◆ make_index_sequence

Definition at line 463 of file detail/common.h.

◆ movable_cast_op_type

using movable_cast_op_type = conditional_t<std::is_pointer<typename std::remove_reference<T>::type>::value, typename std::add_pointer<intrinsic_t<T> >::type, conditional_t<std::is_rvalue_reference<T>::value, typename std::add_rvalue_reference<intrinsic_t<T> >::type, typename std::add_lvalue_reference<intrinsic_t<T> >::type> >

Determine suitable casting operator for a type caster with a movable value. Such a type caster needs to provide operator T*(), operator T&(), and operator T&&() &&. The latter will be called in appropriate contexts where the value can be moved rather than copied.

These operator are automatically provided when using the PYBIND11_TYPE_CASTER macro.

Definition at line 767 of file cast.h.

◆ move_is_plain_type

using move_is_plain_type = satisfies_none_of<T, std::is_void, std::is_pointer, std::is_reference, std::is_const >

Definition at line 1593 of file cast.h.

◆ move_never

Definition at line 1608 of file cast.h.

◆ none_of

using none_of = negation<any_of<Ts...> >

Definition at line 495 of file detail/common.h.

◆ obj_attr_accessor

Definition at line 38 of file pytypes.h.

◆ overload_caster_t

Definition at line 1731 of file cast.h.

◆ remove_all_extents_t

using remove_all_extents_t = typename array_info<T>::type

Definition at line 310 of file numpy.h.

◆ remove_cv_t

using remove_cv_t = typename std::remove_cv<T>::type

Definition at line 451 of file detail/common.h.

◆ remove_reference_t

using remove_reference_t = typename std::remove_reference<T>::type

Definition at line 452 of file detail/common.h.

◆ satisfies_all_of

using satisfies_all_of = all_of<Predicates<T>...>

Definition at line 497 of file detail/common.h.

◆ satisfies_any_of

using satisfies_any_of = any_of<Predicates<T>...>

Definition at line 498 of file detail/common.h.

◆ satisfies_none_of

using satisfies_none_of = none_of<Predicates<T>...>

Definition at line 499 of file detail/common.h.

◆ select_indices

using select_indices = typename select_indices_impl<index_sequence<>, 0, Bs...>::type

Definition at line 470 of file detail/common.h.

◆ sequence_accessor

Definition at line 41 of file pytypes.h.

◆ sequence_iterator

Definition at line 724 of file pytypes.h.

◆ str_attr_accessor

Definition at line 39 of file pytypes.h.

◆ tuple_accessor

Definition at line 43 of file pytypes.h.

◆ tuple_iterator

Definition at line 717 of file pytypes.h.

◆ type_caster_holder

Definition at line 1534 of file cast.h.

◆ type_map

using type_map = std::unordered_map<std::type_index, value_type, type_hash, type_equal_to>

Definition at line 81 of file internals.h.

◆ vector_needs_copy

using vector_needs_copy = negation< std::is_same<decltype(std::declval<Vector>()[typename Vector::size_type()]), typename Vector::value_type &> >

Definition at line 281 of file stl_bind.h.

◆ void_t

using void_t = typename void_t_impl<Ts...>::type

Definition at line 477 of file detail/common.h.

Enumeration Type Documentation

◆ broadcast_trivial

enum broadcast_trivial
strong
Enumerator
non_trivial 
c_trivial 
f_trivial 

Definition at line 1385 of file numpy.h.

◆ op_id

enum op_id : int

Enumeration with all supported operator types.

Enumerator
op_add 
op_sub 
op_mul 
op_div 
op_mod 
op_divmod 
op_pow 
op_lshift 
op_rshift 
op_and 
op_xor 
op_or 
op_neg 
op_pos 
op_abs 
op_invert 
op_int 
op_long 
op_float 
op_str 
op_cmp 
op_gt 
op_ge 
op_lt 
op_le 
op_eq 
op_ne 
op_iadd 
op_isub 
op_imul 
op_idiv 
op_imod 
op_ilshift 
op_irshift 
op_iand 
op_ixor 
op_ior 
op_complex 
op_bool 
op_nonzero 
op_repr 
op_truediv 
op_itruediv 
op_hash 

Definition at line 25 of file operators.h.

◆ op_type

enum op_type : int
Enumerator
op_l 
op_r 
op_u 

Definition at line 34 of file operators.h.

Function Documentation

◆ _() [1/8]

constexpr descr<N - 1> pybind11::detail::_ ( char const(&)  text[N])

Definition at line 54 of file descr.h.

◆ _() [2/8]

constexpr descr<0> pybind11::detail::_ ( char const   (&)[1])

Definition at line 55 of file descr.h.

◆ _() [3/8]

constexpr enable_if_t<B, descr<N1 - 1> > pybind11::detail::_ ( char const(&)  text1[N1],
char const   (&)[N2] 
)

Definition at line 64 of file descr.h.

◆ _() [4/8]

constexpr enable_if_t<!B, descr<N2 - 1> > pybind11::detail::_ ( char const   (&)[N1],
char const(&)  text2[N2] 
)

Definition at line 68 of file descr.h.

◆ _() [5/8]

constexpr enable_if_t<B, T1> pybind11::detail::_ ( const T1 &  d,
const T2 &   
)

Definition at line 73 of file descr.h.

◆ _() [6/8]

constexpr enable_if_t<!B, T2> pybind11::detail::_ ( const T1 &  ,
const T2 &  d 
)

Definition at line 75 of file descr.h.

◆ _() [7/8]

auto constexpr pybind11::detail::_ ( ) -> decltype(int_to_str<Size / 10, Size % 10>::digits)

Definition at line 77 of file descr.h.

◆ _() [8/8]

constexpr descr<1, Type> pybind11::detail::_ ( )

Definition at line 81 of file descr.h.

◆ __attribute__() [1/2]

__attribute__ ( (noinline)  )
inline

Return the type info for a given C++ type; on lookup failure can either throw or return nullptr.

Gets a single pybind11 type info for a python type. Returns nullptr if neither the type nor any ancestors are pybind11-registered. Throws an exception if there are multiple bases–use all_type_info instead if you want to support multiple bases.

Extracts C++ value and holder pointer references from an instance (which may contain multiple values/holders for python-side multiple inheritance) that match the given type. Throws an error if the given type (or ValueType, if omitted) is not a pybind11 base of the given instance. If find_type is omitted (or explicitly specified as nullptr) the first value/holder are returned, regardless of type (and the resulting .type will be nullptr).

The returned object should be short-lived: in particular, it must not outlive the called-upon instance.

Definition at line 160 of file cast.h.

◆ __attribute__() [2/2]

__attribute__ ( (noinline)  ) &
inline

Return a reference to the current internals data.

Definition at line 205 of file internals.h.

◆ __self()

self_t pybind11::detail::__self ( )
inline

Don't warn about an unused variable.

Definition at line 47 of file operators.h.

◆ abs()

op_<op_abs , op_u, self_t, undefined_t> pybind11::detail::abs ( const self_t )
inline

Definition at line 150 of file operators.h.

◆ add_patient()

void pybind11::detail::add_patient ( PyObject *  nurse,
PyObject *  patient 
)
inline

Definition at line 290 of file class.h.

◆ all_type_info()

const std::vector<detail::type_info *>& pybind11::detail::all_type_info ( PyTypeObject *  type)
inline

Extracts vector of type_info pointers of pybind-registered roots of the given Python type. Will be just 1 pybind type for the Python type of a pybind-registered class, or for any Python-side derived class that uses single inheritance. Will contain as many types as required for a Python class that uses multiple inheritance to inherit (directly or indirectly) from multiple pybind-registered classes. Will be empty if neither the type nor any base classes are pybind-registered.

The value is cached for the lifetime of the Python type.

Definition at line 146 of file cast.h.

◆ all_type_info_get_cache()

std::pair< decltype(internals::registered_types_py)::iterator, bool > all_type_info_get_cache ( PyTypeObject *  type)
inline

Definition at line 1624 of file pybind11.h.

◆ array_begin()

array_iterator<T> pybind11::detail::array_begin ( const buffer_info buffer)

Definition at line 1271 of file numpy.h.

◆ array_descriptor_proxy() [1/2]

PyArrayDescr_Proxy* pybind11::detail::array_descriptor_proxy ( PyObject *  ptr)
inline

Definition at line 261 of file numpy.h.

◆ array_descriptor_proxy() [2/2]

const PyArrayDescr_Proxy* pybind11::detail::array_descriptor_proxy ( const PyObject *  ptr)
inline

Definition at line 265 of file numpy.h.

◆ array_end()

array_iterator<T> pybind11::detail::array_end ( const buffer_info buffer)

Definition at line 1276 of file numpy.h.

◆ array_proxy() [1/2]

PyArray_Proxy* pybind11::detail::array_proxy ( void *  ptr)
inline

Definition at line 253 of file numpy.h.

◆ array_proxy() [2/2]

const PyArray_Proxy* pybind11::detail::array_proxy ( const void *  ptr)
inline

Definition at line 257 of file numpy.h.

◆ as_unsigned()

Unsigned pybind11::detail::as_unsigned ( PyObject *  o)

Definition at line 1049 of file pytypes.h.

◆ broadcast()

broadcast_trivial pybind11::detail::broadcast ( const std::array< buffer_info, N > &  buffers,
ssize_t ndim,
std::vector< ssize_t > &  shape 
)

Definition at line 1392 of file numpy.h.

◆ byte_offset_unsafe() [1/2]

ssize_t pybind11::detail::byte_offset_unsafe ( const Strides &  )

Definition at line 326 of file numpy.h.

◆ byte_offset_unsafe() [2/2]

ssize_t pybind11::detail::byte_offset_unsafe ( const Strides &  strides,
ssize_t  i,
Ix...  index 
)

Definition at line 328 of file numpy.h.

◆ c_str()

const char* pybind11::detail::c_str ( Args &&...  args)

Constructs a std::string with the given arguments, stores it in internals, and returns its c_str(). Such strings objects have a long storage duration – the internal strings are only cleared when the program exits or after interpreter shutdown (when embedding), and so are suitable for c-style strings needed by Python internals (such as PyTypeObject's tp_name).

Definition at line 271 of file internals.h.

◆ call_operator_delete() [1/2]

void call_operator_delete ( T *  p,
size_t  s,
size_t   
)

Call class-specific delete if it exists or global otherwise. Can also be an overload set.

Definition at line 1000 of file pybind11.h.

◆ call_operator_delete() [2/2]

void pybind11::detail::call_operator_delete ( void *  p,
size_t  s,
size_t  a 
)
inline

Definition at line 1004 of file pybind11.h.

◆ cast_op() [1/2]

make_caster<T>::template cast_op_type<T> pybind11::detail::cast_op ( make_caster< T > &  caster)

Definition at line 913 of file cast.h.

◆ cast_op() [2/2]

make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type> pybind11::detail::cast_op ( make_caster< T > &&  caster)

Definition at line 917 of file cast.h.

◆ cast_ref() [1/2]

enable_if_t<cast_is_temporary_value_reference<T>::value, T> pybind11::detail::cast_ref ( object &&  o,
make_caster< T > &  caster 
)

Definition at line 1735 of file cast.h.

◆ cast_ref() [2/2]

enable_if_t<!cast_is_temporary_value_reference<T>::value, T> pybind11::detail::cast_ref ( object &&  ,
overload_unused  
)

Definition at line 1738 of file cast.h.

◆ cast_safe() [1/2]

enable_if_t<!cast_is_temporary_value_reference<T>::value, T> pybind11::detail::cast_safe ( object &&  o)

Definition at line 1744 of file cast.h.

◆ cast_safe() [2/2]

enable_if_t<cast_is_temporary_value_reference<T>::value, T> pybind11::detail::cast_safe ( object &&  )

Definition at line 1746 of file cast.h.

◆ cast_safe< void >()

void pybind11::detail::cast_safe< void > ( object &&  )
inline

Definition at line 1748 of file cast.h.

◆ check_flags()

bool pybind11::detail::check_flags ( const void *  ptr,
int  flag 
)
inline

Definition at line 269 of file numpy.h.

◆ clear_instance()

void pybind11::detail::clear_instance ( PyObject *  self)
inline

Clears all internal data from the instance and removes it from registered instances in preparation for deallocation.

Definition at line 315 of file class.h.

◆ clear_patients()

void pybind11::detail::clear_patients ( PyObject *  self)
inline

Definition at line 298 of file class.h.

◆ collect_arguments() [1/2]

simple_collector<policy> pybind11::detail::collect_arguments ( Args &&...  args)

Collect only positional arguments for a Python function call.

Definition at line 2089 of file cast.h.

◆ collect_arguments() [2/2]

unpacking_collector<policy> pybind11::detail::collect_arguments ( Args &&...  args)

Collect all arguments, including keywords and unpacking (only instantiated when needed)

Definition at line 2096 of file cast.h.

◆ concat() [1/3]

constexpr descr<0> pybind11::detail::concat ( )

Definition at line 83 of file descr.h.

◆ concat() [2/3]

constexpr descr<N, Ts...> pybind11::detail::concat ( const descr< N, Ts... > &  descr)

Definition at line 86 of file descr.h.

◆ concat() [3/3]

constexpr auto pybind11::detail::concat ( const descr< N, Ts... > &  d,
const Args &...  args 
) -> decltype(std::declval<descr<N + 2, Ts...>>() + concat(args...))

Definition at line 89 of file descr.h.

◆ constexpr_first()

constexpr int pybind11::detail::constexpr_first ( )

Return the index of the first type in Ts which satisfies Predicate<T>. Returns sizeof...(Ts) if none match.

Definition at line 545 of file detail/common.h.

◆ constexpr_last()

constexpr int pybind11::detail::constexpr_last ( )

Return the index of the last type in Ts which satisfies Predicate<T>, or -1 if none match.

Definition at line 549 of file detail/common.h.

◆ constexpr_sum() [1/2]

constexpr size_t pybind11::detail::constexpr_sum ( )

Compile-time integer sum.

Definition at line 526 of file detail/common.h.

◆ constexpr_sum() [2/2]

constexpr size_t pybind11::detail::constexpr_sum ( n,
Ts...  ns 
)

Definition at line 528 of file detail/common.h.

◆ deregister_instance()

bool pybind11::detail::deregister_instance ( instance self,
void *  valptr,
const type_info tinfo 
)
inline

Definition at line 240 of file class.h.

◆ deregister_instance_impl()

bool pybind11::detail::deregister_instance_impl ( void *  ptr,
instance self 
)
inline

Definition at line 222 of file class.h.

◆ eigen_array_cast()

handle pybind11::detail::eigen_array_cast ( typename props::Type const &  src,
handle  base = handle(),
bool  writeable = true 
)

Definition at line 213 of file eigen.h.

◆ eigen_encapsulate()

handle pybind11::detail::eigen_encapsulate ( Type *  src)

Definition at line 244 of file eigen.h.

◆ eigen_ref_array()

handle pybind11::detail::eigen_ref_array ( Type &  src,
handle  parent = none() 
)

Definition at line 233 of file eigen.h.

◆ enable_buffer_protocol()

void pybind11::detail::enable_buffer_protocol ( PyHeapTypeObject *  heap_type)
inline

Give this type a buffer interface.

Definition at line 505 of file class.h.

◆ enable_dynamic_attributes()

void pybind11::detail::enable_dynamic_attributes ( PyHeapTypeObject *  heap_type)
inline

Give instances of this type a __dict__ and opt into garbage collection.

Definition at line 443 of file class.h.

◆ erase_all()

void pybind11::detail::erase_all ( std::string &  string,
const std::string &  search 
)
inline

Erase all occurrences of a substring.

Definition at line 24 of file typeid.h.

◆ error_string()

std::string pybind11::detail::error_string ( )
inline

◆ expected_num_args()

constexpr bool pybind11::detail::expected_num_args ( size_t  nargs,
bool  has_args,
bool  has_kwargs 
)

Check the number of named arguments at compile time.

Definition at line 488 of file attr.h.

◆ float_()

op_<op_float , op_u, self_t, undefined_t> pybind11::detail::float_ ( const self_t )
inline

Definition at line 155 of file operators.h.

◆ for() [1/3]

pybind11::detail::for ( handle parent :reinterpret_borrow< tuple t->tp_bases)

◆ for() [2/3]

for ( )

Definition at line 97 of file cast.h.

◆ for() [3/3]

pybind11::detail::for ( auto  it = range.first; it != range.second; ++it)

Definition at line 456 of file cast.h.

◆ forward_like()

forwarded_type<T, U> pybind11::detail::forward_like ( U &&  u)

Forwards a value U as rvalue or lvalue according to whether T is rvalue or lvalue; typically used for forwarding a container's elements.

Definition at line 63 of file stl.h.

◆ get_exception_object()

exception<CppException>& pybind11::detail::get_exception_object ( )

Definition at line 1788 of file pybind11.h.

◆ get_function()

handle pybind11::detail::get_function ( handle  value)
inline

Definition at line 450 of file pytypes.h.

◆ get_global_type_info()

detail::type_info* pybind11::detail::get_global_type_info ( const std::type_index &  tp)
inline

Definition at line 177 of file cast.h.

◆ get_internals_pp()

internals**& pybind11::detail::get_internals_pp ( )
inline

Each module locally stores a pointer to the internals data. The data itself is shared among modules with the same PYBIND11_INTERNALS_ID.

Definition at line 171 of file internals.h.

◆ get_local_type_info()

detail::type_info* pybind11::detail::get_local_type_info ( const std::type_index &  tp)
inline

Definition at line 169 of file cast.h.

◆ get_numpy_internals()

numpy_internals& pybind11::detail::get_numpy_internals ( )
inline

Definition at line 105 of file numpy.h.

◆ get_thread_state_unchecked()

PyThreadState* pybind11::detail::get_thread_state_unchecked ( )
inline

Definition at line 465 of file cast.h.

◆ handle()

return pybind11::detail::handle ( )

◆ hash()

op_<op_hash , op_u, self_t, undefined_t> pybind11::detail::hash ( const self_t )
inline

Definition at line 151 of file operators.h.

◆ if() [1/3]

pybind11::detail::if ( type)

◆ if() [2/3]

pybind11::detail::if ( kwargs.  contains"file")

Definition at line 1825 of file pybind11.h.

◆ if() [3/3]

pybind11::detail::if ( kwargs.  contains("flush") &&kwargs.cast< bool >()["flush"])

◆ ignore_unused()

void pybind11::detail::ignore_unused ( const int *  )
inline

Ignore that a variable is unused in compiler warnings.

Definition at line 644 of file detail/common.h.

◆ instance_simple_holder_in_ptrs()

constexpr size_t pybind11::detail::instance_simple_holder_in_ptrs ( )

The space to allocate for simple layout instance holders (see below) in multiple of the size of a pointer (e.g. 2 means 16 bytes on 64-bit architectures). The default is the minimum required to holder either a std::unique_ptr or std::shared_ptr (which is almost always sizeof(std::shared_ptr<T>)).

Definition at line 366 of file detail/common.h.

◆ int_()

op_<op_int , op_u, self_t, undefined_t> pybind11::detail::int_ ( const self_t )
inline

Definition at line 154 of file operators.h.

◆ isinstance()

return pybind11::detail::isinstance ( obj  ,
type   
)

◆ isinstance_generic()

bool pybind11::detail::isinstance_generic ( handle  obj,
const std::type_info &  tp 
)
inline

◆ keep_alive_impl() [1/3]

void pybind11::detail::keep_alive_impl ( size_t  Nurse,
size_t  Patient,
function_call call,
handle  ret 
)
inline

◆ keep_alive_impl() [2/3]

void keep_alive_impl ( handle  nurse,
handle  patient 
)
inline

Definition at line 1583 of file pybind11.h.

◆ keep_alive_impl() [3/3]

pybind11::detail::keep_alive_impl ( get_arg(Nurse)  ,
get_arg(Patient  
)

◆ load_type() [1/2]

type_caster<T, SFINAE>& pybind11::detail::load_type ( type_caster< T, SFINAE > &  conv,
const handle handle 
)

Definition at line 1637 of file cast.h.

◆ load_type() [2/2]

make_caster<T> pybind11::detail::load_type ( const handle handle)

Definition at line 1649 of file cast.h.

◆ log2()

static constexpr int pybind11::detail::log2 ( size_t  n,
int  k = 0 
)
inlinestatic

Definition at line 355 of file detail/common.h.

◆ make_default_metaclass()

PyTypeObject * make_default_metaclass ( )
inline

This metaclass is assigned by default to all pybind11 types and is required in order for static properties to function correctly. Users may override this using py::metaclass. Return value: New reference.

Definition at line 162 of file class.h.

◆ make_new_instance()

PyObject * make_new_instance ( PyTypeObject *  type)
inline

Instance creation function for all pybind11 types. It allocates the internal instance layout for holding C++ objects and holders. Allocation is done lazily (the first time the instance is cast to a reference or pointer), and initialization is done by an __init__ function.

Definition at line 250 of file class.h.

◆ make_new_python_type()

PyObject* pybind11::detail::make_new_python_type ( const type_record rec)
inline

Create a brand new Python type according to the type_record specification. Return value: New reference.

Definition at line 517 of file class.h.

◆ make_object_base_type()

PyObject * make_object_base_type ( PyTypeObject *  metaclass)
inline

Create the type which can be used as a common base for all classes. This is needed in order to satisfy Python's requirements for multiple inheritance. Return value: New reference.

Definition at line 365 of file class.h.

◆ make_static_property_type()

PyTypeObject * make_static_property_type ( )
inline

A static_property is the same as a property but the __get__() and __set__() methods are modified to always use the object type instead of a concrete instance. Return value: New reference.

Definition at line 48 of file class.h.

◆ map_assignment() [1/3]

void pybind11::detail::map_assignment ( const Args &  ...)

Definition at line 511 of file stl_bind.h.

◆ map_assignment() [2/3]

void pybind11::detail::map_assignment ( enable_if_t< std::is_copy_assignable< typename Map::mapped_type >::value, Class_ > &  cl)

Definition at line 515 of file stl_bind.h.

◆ map_assignment() [3/3]

void pybind11::detail::map_assignment ( enable_if_t< !std::is_copy_assignable< typename Map::mapped_type >::value &&is_copy_constructible< typename Map::mapped_type >::value, Class_ > &  cl)

Definition at line 530 of file stl_bind.h.

◆ map_if_insertion_operator() [1/2]

void pybind11::detail::map_if_insertion_operator ( const Args &  ...)

Definition at line 510 of file stl_bind.h.

◆ map_if_insertion_operator() [2/2]

auto pybind11::detail::map_if_insertion_operator ( Class_ &  cl,
std::string const &  name 
) -> decltype(std::declval<std::ostream&>() << std::declval<typename Map::key_type>() << std::declval<typename Map::mapped_type>(), void())

Definition at line 551 of file stl_bind.h.

◆ object_or_cast() [1/3]

auto pybind11::detail::object_or_cast ( T &&  o) -> decltype(std::forward<T>(o))

Definition at line 467 of file pytypes.h.

◆ object_or_cast() [2/3]

handle pybind11::detail::object_or_cast ( PyObject *  ptr)
inline

Definition at line 472 of file pytypes.h.

◆ object_or_cast() [3/3]

object object_or_cast ( T &&  o)

Definition at line 1727 of file cast.h.

◆ operator &() [1/3]

op_<op_and , op_l, self_t, self_t> pybind11::detail::operator& ( const self_t ,
const self_t  
)
inline

Definition at line 128 of file operators.h.

◆ operator &() [2/3]

op_<op_and , op_l, self_t, T> pybind11::detail::operator& ( const self_t ,
const T &   
)

Definition at line 128 of file operators.h.

◆ operator &() [3/3]

op_<op_and , op_r, T, self_t> pybind11::detail::operator& ( const T &  ,
const self_t  
)

Definition at line 128 of file operators.h.

◆ operator &=()

op_<op_iand , op_l, self_t, T> pybind11::detail::operator&= ( const self_t ,
const T &   
)

Definition at line 145 of file operators.h.

◆ operator!()

op_<op_bool , op_u, self_t, undefined_t> pybind11::detail::operator! ( const self_t )
inline

Definition at line 153 of file operators.h.

◆ operator!=() [1/3]

op_<op_ne , op_l, self_t, self_t> pybind11::detail::operator!= ( const self_t ,
const self_t  
)
inline

Definition at line 131 of file operators.h.

◆ operator!=() [2/3]

op_<op_ne , op_l, self_t, T> pybind11::detail::operator!= ( const self_t ,
const T &   
)

Definition at line 131 of file operators.h.

◆ operator!=() [3/3]

op_<op_ne , op_r, T, self_t> pybind11::detail::operator!= ( const T &  ,
const self_t  
)

Definition at line 131 of file operators.h.

◆ operator%() [1/3]

op_<op_mod , op_l, self_t, self_t> pybind11::detail::operator% ( const self_t ,
const self_t  
)
inline

Definition at line 125 of file operators.h.

◆ operator%() [2/3]

op_<op_mod , op_l, self_t, T> pybind11::detail::operator% ( const self_t ,
const T &   
)

Definition at line 125 of file operators.h.

◆ operator%() [3/3]

op_<op_mod , op_r, T, self_t> pybind11::detail::operator% ( const T &  ,
const self_t  
)

Definition at line 125 of file operators.h.

◆ operator%=()

op_<op_imod , op_l, self_t, T> pybind11::detail::operator%= ( const self_t ,
const T &   
)

Definition at line 142 of file operators.h.

◆ operator*() [1/3]

op_<op_mul , op_l, self_t, self_t> pybind11::detail::operator* ( const self_t ,
const self_t  
)
inline

Definition at line 123 of file operators.h.

◆ operator*() [2/3]

op_<op_mul , op_l, self_t, T> pybind11::detail::operator* ( const self_t ,
const T &   
)

Definition at line 123 of file operators.h.

◆ operator*() [3/3]

op_<op_mul , op_r, T, self_t> pybind11::detail::operator* ( const T &  ,
const self_t  
)

Definition at line 123 of file operators.h.

◆ operator*=()

op_<op_imul , op_l, self_t, T> pybind11::detail::operator*= ( const self_t ,
const T &   
)

Definition at line 140 of file operators.h.

◆ operator+() [1/5]

constexpr descr<N1 + N2, Ts1..., Ts2...> pybind11::detail::operator+ ( const descr< N1, Ts1... > &  a,
const descr< N2, Ts2... > &  b 
)

Definition at line 49 of file descr.h.

◆ operator+() [2/5]

op_<op_add , op_l, self_t, self_t> pybind11::detail::operator+ ( const self_t ,
const self_t  
)
inline

Definition at line 122 of file operators.h.

◆ operator+() [3/5]

op_<op_add , op_l, self_t, T> pybind11::detail::operator+ ( const self_t ,
const T &   
)

Definition at line 122 of file operators.h.

◆ operator+() [4/5]

op_<op_add , op_r, T, self_t> pybind11::detail::operator+ ( const T &  ,
const self_t  
)

Definition at line 122 of file operators.h.

◆ operator+() [5/5]

op_<op_pos , op_u, self_t, undefined_t> pybind11::detail::operator+ ( const self_t )
inline

Definition at line 149 of file operators.h.

◆ operator+=()

op_<op_iadd , op_l, self_t, T> pybind11::detail::operator+= ( const self_t ,
const T &   
)

Definition at line 138 of file operators.h.

◆ operator-() [1/4]

op_<op_sub , op_r, T, self_t> pybind11::detail::operator- ( const T &  ,
const self_t  
)

Definition at line 121 of file operators.h.

◆ operator-() [2/4]

op_<op_sub , op_l, self_t, self_t> pybind11::detail::operator- ( const self_t ,
const self_t  
)
inline

Definition at line 121 of file operators.h.

◆ operator-() [3/4]

op_<op_sub , op_l, self_t, T> pybind11::detail::operator- ( const self_t ,
const T &   
)

Definition at line 121 of file operators.h.

◆ operator-() [4/4]

op_<op_neg , op_u, self_t, undefined_t> pybind11::detail::operator- ( const self_t )
inline

Definition at line 148 of file operators.h.

◆ operator-=()

op_<op_isub , op_l, self_t, T> pybind11::detail::operator-= ( const self_t ,
const T &   
)

Definition at line 139 of file operators.h.

◆ operator/() [1/3]

op_<op_truediv , op_l, self_t, T> pybind11::detail::operator/ ( const self_t ,
const T &   
)

Definition at line 124 of file operators.h.

◆ operator/() [2/3]

op_<op_truediv , op_l, self_t, self_t> pybind11::detail::operator/ ( const self_t ,
const self_t  
)
inline

Definition at line 124 of file operators.h.

◆ operator/() [3/3]

op_<op_truediv , op_r, T, self_t> pybind11::detail::operator/ ( const T &  ,
const self_t  
)

Definition at line 124 of file operators.h.

◆ operator/=()

op_<op_itruediv , op_l, self_t, T> pybind11::detail::operator/= ( const self_t ,
const T &   
)

Definition at line 141 of file operators.h.

◆ operator<() [1/3]

op_<op_lt , op_l, self_t, self_t> pybind11::detail::operator< ( const self_t ,
const self_t  
)
inline

Definition at line 135 of file operators.h.

◆ operator<() [2/3]

op_<op_lt , op_l, self_t, T> pybind11::detail::operator< ( const self_t ,
const T &   
)

Definition at line 135 of file operators.h.

◆ operator<() [3/3]

op_<op_lt , op_r, T, self_t> pybind11::detail::operator< ( const T &  ,
const self_t  
)

Definition at line 135 of file operators.h.

◆ operator<<() [1/3]

op_<op_lshift , op_l, self_t, T> pybind11::detail::operator<< ( const self_t ,
const T &   
)

Definition at line 126 of file operators.h.

◆ operator<<() [2/3]

op_<op_lshift , op_l, self_t, self_t> pybind11::detail::operator<< ( const self_t ,
const self_t  
)
inline

Definition at line 126 of file operators.h.

◆ operator<<() [3/3]

op_<op_lshift , op_r, T, self_t> pybind11::detail::operator<< ( const T &  ,
const self_t  
)

Definition at line 126 of file operators.h.

◆ operator<<=()

op_<op_ilshift , op_l, self_t, T> pybind11::detail::operator<<= ( const self_t ,
const T &   
)

Definition at line 143 of file operators.h.

◆ operator<=() [1/3]

op_<op_le , op_l, self_t, self_t> pybind11::detail::operator<= ( const self_t ,
const self_t  
)
inline

Definition at line 136 of file operators.h.

◆ operator<=() [2/3]

op_<op_le , op_r, T, self_t> pybind11::detail::operator<= ( const T &  ,
const self_t  
)

Definition at line 136 of file operators.h.

◆ operator<=() [3/3]

op_<op_le , op_l, self_t, T> pybind11::detail::operator<= ( const self_t ,
const T &   
)

Definition at line 136 of file operators.h.

◆ operator==() [1/3]

op_<op_eq , op_r, T, self_t> pybind11::detail::operator== ( const T &  ,
const self_t  
)

Definition at line 130 of file operators.h.

◆ operator==() [2/3]

op_<op_eq , op_l, self_t, self_t> pybind11::detail::operator== ( const self_t ,
const self_t  
)
inline

Definition at line 130 of file operators.h.

◆ operator==() [3/3]

op_<op_eq , op_l, self_t, T> pybind11::detail::operator== ( const self_t ,
const T &   
)

Definition at line 130 of file operators.h.

◆ operator>() [1/3]

op_<op_gt , op_l, self_t, self_t> pybind11::detail::operator> ( const self_t ,
const self_t  
)
inline

Definition at line 133 of file operators.h.

◆ operator>() [2/3]

op_<op_gt , op_l, self_t, T> pybind11::detail::operator> ( const self_t ,
const T &   
)

Definition at line 133 of file operators.h.

◆ operator>() [3/3]

op_<op_gt , op_r, T, self_t> pybind11::detail::operator> ( const T &  ,
const self_t  
)

Definition at line 133 of file operators.h.

◆ operator>=() [1/3]

op_<op_ge , op_l, self_t, T> pybind11::detail::operator>= ( const self_t ,
const T &   
)

Definition at line 134 of file operators.h.

◆ operator>=() [2/3]

op_<op_ge , op_l, self_t, self_t> pybind11::detail::operator>= ( const self_t ,
const self_t  
)
inline

Definition at line 134 of file operators.h.

◆ operator>=() [3/3]

op_<op_ge , op_r, T, self_t> pybind11::detail::operator>= ( const T &  ,
const self_t  
)

Definition at line 134 of file operators.h.

◆ operator>>() [1/3]

op_<op_rshift , op_l, self_t, self_t> pybind11::detail::operator>> ( const self_t ,
const self_t  
)
inline

Definition at line 127 of file operators.h.

◆ operator>>() [2/3]

op_<op_rshift , op_r, T, self_t> pybind11::detail::operator>> ( const T &  ,
const self_t  
)

Definition at line 127 of file operators.h.

◆ operator>>() [3/3]

op_<op_rshift , op_l, self_t, T> pybind11::detail::operator>> ( const self_t ,
const T &   
)

Definition at line 127 of file operators.h.

◆ operator>>=()

op_<op_irshift , op_l, self_t, T> pybind11::detail::operator>>= ( const self_t ,
const T &   
)

Definition at line 144 of file operators.h.

◆ operator^() [1/3]

op_<op_xor , op_l, self_t, T> pybind11::detail::operator^ ( const self_t ,
const T &   
)

Definition at line 129 of file operators.h.

◆ operator^() [2/3]

op_<op_xor , op_r, T, self_t> pybind11::detail::operator^ ( const T &  ,
const self_t  
)

Definition at line 129 of file operators.h.

◆ operator^() [3/3]

op_<op_xor , op_l, self_t, self_t> pybind11::detail::operator^ ( const self_t ,
const self_t  
)
inline

Definition at line 129 of file operators.h.

◆ operator^=()

op_<op_ixor , op_l, self_t, T> pybind11::detail::operator^= ( const self_t ,
const T &   
)

Definition at line 146 of file operators.h.

◆ operator|() [1/3]

op_<op_or , op_l, self_t, self_t> pybind11::detail::operator| ( const self_t ,
const self_t  
)
inline

Definition at line 132 of file operators.h.

◆ operator|() [2/3]

op_<op_or , op_l, self_t, T> pybind11::detail::operator| ( const self_t ,
const T &   
)

Definition at line 132 of file operators.h.

◆ operator|() [3/3]

op_<op_or , op_r, T, self_t> pybind11::detail::operator| ( const T &  ,
const self_t  
)

Definition at line 132 of file operators.h.

◆ operator|=()

op_<op_ior , op_l, self_t, T> pybind11::detail::operator|= ( const self_t ,
const T &   
)

Definition at line 147 of file operators.h.

◆ operator~()

op_<op_invert , op_u, self_t, undefined_t> pybind11::detail::operator~ ( const self_t )
inline

Definition at line 152 of file operators.h.

◆ platform_lookup()

constexpr int pybind11::detail::platform_lookup ( Int...  codes)

Definition at line 118 of file numpy.h.

◆ plus_impl()

constexpr descr<N1 + N2, Ts1..., Ts2...> pybind11::detail::plus_impl ( const descr< N1, Ts1... > &  a,
const descr< N2, Ts2... > &  b,
index_sequence< Is1... >  ,
index_sequence< Is2... >   
)

Definition at line 43 of file descr.h.

◆ pybind11_clear()

int pybind11::detail::pybind11_clear ( PyObject *  self)
inline

dynamic_attr: Allow the GC to clear the dictionary.

Definition at line 436 of file class.h.

◆ pybind11_get_dict()

PyObject* pybind11::detail::pybind11_get_dict ( PyObject *  self,
void *   
)
inline

dynamic_attr: Support for d = instance.__dict__.

Definition at line 406 of file class.h.

◆ pybind11_getbuffer()

int pybind11::detail::pybind11_getbuffer ( PyObject *  obj,
Py_buffer *  view,
int  flags 
)
inline

buffer_protocol: Fill in the view as specified by flags.

Definition at line 464 of file class.h.

◆ pybind11_meta_setattro()

int pybind11::detail::pybind11_meta_setattro ( PyObject *  obj,
PyObject *  name,
PyObject *  value 
)
inline

Types with static properties need to handle Type.static_prop = x in a specific way. By default, Python replaces the static_property itself, but for wrapped C++ types we need to call static_property.__set__() in order to propagate the new value to the underlying C++ data structure.

Definition at line 110 of file class.h.

◆ pybind11_object_dealloc()

void pybind11::detail::pybind11_object_dealloc ( PyObject *  self)
inline

Instance destructor function for all pybind11 types. It calls type_info.dealloc to destroy the C++ object itself, while the rest is Python bookkeeping.

Definition at line 347 of file class.h.

◆ pybind11_object_init()

int pybind11::detail::pybind11_object_init ( PyObject *  self,
PyObject *  ,
PyObject *   
)
inline

An __init__ function constructs the C++ object. Users should provide at least one of these using py::init or directly with .def(__init__, ...). Otherwise, the following default function will be used which simply throws an exception.

Definition at line 278 of file class.h.

◆ pybind11_object_new()

PyObject* pybind11::detail::pybind11_object_new ( PyTypeObject *  type,
PyObject *  ,
PyObject *   
)
inline

Instance creation function for all pybind11 types. It only allocates space for the C++ object, but doesn't call the constructor – an __init__ function must do that.

Definition at line 271 of file class.h.

◆ pybind11_releasebuffer()

void pybind11::detail::pybind11_releasebuffer ( PyObject *  ,
Py_buffer *  view 
)
inline

buffer_protocol: Release the resources of the buffer.

Definition at line 500 of file class.h.

◆ pybind11_set_dict()

int pybind11::detail::pybind11_set_dict ( PyObject *  self,
PyObject *  new_dict,
void *   
)
inline

dynamic_attr: Support for instance.__dict__ = dict().

Definition at line 415 of file class.h.

◆ pybind11_static_get()

PyObject* pybind11::detail::pybind11_static_get ( PyObject *  self,
PyObject *  ,
PyObject *  cls 
)
inline

pybind11_static_property.__get__(): Always pass the class instead of the instance.

Definition at line 35 of file class.h.

◆ pybind11_static_set()

int pybind11::detail::pybind11_static_set ( PyObject *  self,
PyObject *  obj,
PyObject *  value 
)
inline

pybind11_static_property.__set__(): Just like the above __get__().

Definition at line 40 of file class.h.

◆ pybind11_traverse()

int pybind11::detail::pybind11_traverse ( PyObject *  self,
visitproc  visit,
void *  arg 
)
inline

dynamic_attr: Allow the garbage collector to traverse the internal instance __dict__.

Definition at line 429 of file class.h.

◆ PyIterable_Check()

bool pybind11::detail::PyIterable_Check ( PyObject *  obj)
inline

Definition at line 727 of file pytypes.h.

◆ PyNone_Check()

bool pybind11::detail::PyNone_Check ( PyObject *  o)
inline

Definition at line 738 of file pytypes.h.

◆ PyStaticMethod_Check()

bool pybind11::detail::PyStaticMethod_Check ( PyObject *  o)
inline

Definition at line 745 of file pytypes.h.

◆ PyUnicode_Check_Permissive()

bool pybind11::detail::PyUnicode_Check_Permissive ( PyObject *  o)
inline

Definition at line 743 of file pytypes.h.

◆ register_instance()

void pybind11::detail::register_instance ( instance self,
void *  valptr,
const type_info tinfo 
)
inline

Definition at line 234 of file class.h.

◆ register_instance_impl()

bool pybind11::detail::register_instance_impl ( void *  ptr,
instance self 
)
inline

Definition at line 218 of file class.h.

◆ registered_local_types_cpp()

type_map<type_info *>& pybind11::detail::registered_local_types_cpp ( )
inline

Works like internals.registered_types_cpp, but for module-local registered types:

Definition at line 261 of file internals.h.

◆ same_type()

bool pybind11::detail::same_type ( const std::type_info &  lhs,
const std::type_info &  rhs 
)
inline

Definition at line 59 of file internals.h.

◆ set_operator_new() [1/2]

void pybind11::detail::set_operator_new ( type_record r)

Set the pointer to operator new if it exists. The cast is needed because it can be overloaded.

Definition at line 988 of file pybind11.h.

◆ set_operator_new() [2/2]

void pybind11::detail::set_operator_new (   ...)

Definition at line 990 of file pybind11.h.

◆ size_in_ptrs()

static constexpr size_t pybind11::detail::size_in_ptrs ( size_t  s)
inlinestatic

Definition at line 358 of file detail/common.h.

◆ translate_exception()

void pybind11::detail::translate_exception ( std::exception_ptr  p)
inline

Definition at line 176 of file internals.h.

◆ translate_local_exception()

void pybind11::detail::translate_local_exception ( std::exception_ptr  p)
inline

Definition at line 195 of file internals.h.

◆ traverse_offset_bases()

void pybind11::detail::traverse_offset_bases ( void *  valueptr,
const detail::type_info tinfo,
instance self,
bool(*)(void *, instance *)  f 
)
inline

For multiple inheritance types we need to recursively register/deregister base pointers for any base classes with pointers that are difference from the instance value pointer so that we can correctly recognize an offset base class pointer. This calls a function with any offset base ptrs.

Definition at line 201 of file class.h.

◆ type_descr()

constexpr descr<N + 2, Ts...> pybind11::detail::type_descr ( const descr< N, Ts... > &  descr)

Definition at line 95 of file descr.h.

◆ type_incref()

PyTypeObject* pybind11::detail::type_incref ( PyTypeObject *  type)
inline

Definition at line 27 of file class.h.

◆ vector_accessor() [1/2]

void pybind11::detail::vector_accessor ( enable_if_t<!vector_needs_copy< Vector >::value, Class_ > &  cl)

Definition at line 285 of file stl_bind.h.

◆ vector_accessor() [2/2]

void pybind11::detail::vector_accessor ( enable_if_t< vector_needs_copy< Vector >::value, Class_ > &  cl)

Definition at line 319 of file stl_bind.h.

◆ vector_buffer() [1/2]

enable_if_t<detail::any_of<std::is_same<Args, buffer_protocol>...>::value> pybind11::detail::vector_buffer ( Class_ &  cl)

Definition at line 374 of file stl_bind.h.

◆ vector_buffer() [2/2]

enable_if_t<!detail::any_of<std::is_same<Args, buffer_protocol>...>::value> pybind11::detail::vector_buffer ( Class_ &  )

Definition at line 407 of file stl_bind.h.

◆ vector_if_copy_constructible() [1/2]

void pybind11::detail::vector_if_copy_constructible ( const Args &  ...)

Definition at line 63 of file stl_bind.h.

◆ vector_if_copy_constructible() [2/2]

void pybind11::detail::vector_if_copy_constructible ( enable_if_t< is_copy_constructible< Vector >::value, Class_ > &  cl)

Definition at line 69 of file stl_bind.h.

◆ vector_if_equal_operator() [1/2]

void pybind11::detail::vector_if_equal_operator ( const Args &  ...)

Definition at line 64 of file stl_bind.h.

◆ vector_if_equal_operator() [2/2]

void pybind11::detail::vector_if_equal_operator ( enable_if_t< is_comparable< Vector >::value, Class_ > &  cl)

Definition at line 74 of file stl_bind.h.

◆ vector_if_insertion_operator() [1/2]

void pybind11::detail::vector_if_insertion_operator ( const Args &  ...)

Definition at line 65 of file stl_bind.h.

◆ vector_if_insertion_operator() [2/2]

auto pybind11::detail::vector_if_insertion_operator ( Class_ &  cl,
std::string const &  name 
) -> decltype(std::declval<std::ostream&>() << std::declval<typename Vector::value_type>(), void())

Definition at line 344 of file stl_bind.h.

◆ vector_modifiers() [1/2]

void pybind11::detail::vector_modifiers ( const Args &  ...)

Definition at line 66 of file stl_bind.h.

◆ vector_modifiers() [2/2]

void pybind11::detail::vector_modifiers ( enable_if_t< is_copy_constructible< typename Vector::value_type >::value, Class_ > &  cl)

Slicing protocol

Definition at line 113 of file stl_bind.h.

◆ vectorize_extractor()

vectorize_helper<Func, Return, Args...> pybind11::detail::vectorize_extractor ( const Func &  f,
Return(*)(Args ...)   
)

Definition at line 1600 of file numpy.h.

◆ write() [1/2]

pybind11::detail::write ( line  )

◆ write() [2/2]

pybind11::detail::write ( kwargs.contains("end") ? kwargs :cast("\  ["end"])

Variable Documentation

◆ bases

std::vector<type_info *>& bases
Initial value:
{
std::vector<PyTypeObject *> check

Definition at line 91 of file cast.h.

◆ call

Definition at line 1610 of file pybind11.h.

◆ direct_converter

const std::type_info ssize_t bool(* direct_converter) (PyObject *, void *&))

Definition at line 1092 of file numpy.h.

◆ else

else
Initial value:
{
try {
file = module::import("sys").attr("stdout");
} catch (const error_already_set &) {
return;
}
}
auto write = file.attr("write")
obj_attr_accessor attr(handle key) const
Definition: pytypes.h:1410
write(kwargs.contains("end") ? kwargs["end"] :cast("\))

Definition at line 1827 of file pybind11.h.

◆ file

object file

Definition at line 1824 of file pybind11.h.

◆ itemsize

const std::type_info ssize_t itemsize

Definition at line 1091 of file numpy.h.

◆ kwargs

Initial value:
{
auto strings = tuple(args.size())

Definition at line 1816 of file pybind11.h.

◆ line

auto line = sep.attr("join")(strings)

Definition at line 1822 of file pybind11.h.

◆ Patient

size_t Patient

Definition at line 1610 of file pybind11.h.

◆ range

auto range = instances.equal_range(ptr)

Definition at line 455 of file cast.h.

◆ ret

Initial value:
{
auto get_arg = [&](size_t n) {
if (n == 0)
return ret;
else if (n == 1 && call.init_self)
return call.init_self;
else if (n <= call.args.size())
return call.args[n - 1];
return handle();
}
std::vector< handle > args
Arguments passed to the function:
Definition: cast.h:1866
handle init_self
If this is a call to an initializer, this argument contains self
Definition: cast.h:1879
size_t function_call handle ret
Definition: pybind11.h:1610
size_t function_call & call
Definition: pybind11.h:1610

Definition at line 1610 of file pybind11.h.

◆ self

const self_t self = self_t()
static

Definition at line 41 of file operators.h.

◆ sep

auto sep = kwargs.contains("sep") ? kwargs["sep"] : cast(" ")

Definition at line 1821 of file pybind11.h.

◆ tinfo

const std::type_info& tinfo

Definition at line 1091 of file numpy.h.

◆ tp

const std::type_info& tp
Initial value:
{
handle type = detail::get_type_handle(tp, false)
const std::type_info & tp
Definition: cast.h:399
const detail::type_info * type
Definition: cast.h:453

Definition at line 399 of file cast.h.

◆ type

const detail::type_info* type
Initial value:
{
auto &instances = get_internals().registered_instances

Definition at line 453 of file cast.h.

◆ type_dict

auto const& type_dict = get_internals().registered_types_py

Definition at line 96 of file cast.h.