12 #define PYBIND11_VERSION_MAJOR 2 13 #define PYBIND11_VERSION_MINOR 10 14 #define PYBIND11_VERSION_PATCH 0 18 #define PYBIND11_VERSION_HEX 0x020A0000 20 #define PYBIND11_NAMESPACE_BEGIN(name) namespace name { 21 #define PYBIND11_NAMESPACE_END(name) } 26 #if !defined(PYBIND11_NAMESPACE) 28 # define PYBIND11_NAMESPACE pybind11 __attribute__((visibility("hidden"))) 30 # define PYBIND11_NAMESPACE pybind11 34 #if !(defined(_MSC_VER) && __cplusplus == 199711L) 35 # if __cplusplus >= 201402L 36 # define PYBIND11_CPP14 37 # if __cplusplus >= 201703L 38 # define PYBIND11_CPP17 39 # if __cplusplus >= 202002L 40 # define PYBIND11_CPP20 45 #elif defined(_MSC_VER) && __cplusplus == 199711L 49 # if _MSVC_LANG >= 201402L 50 # define PYBIND11_CPP14 51 # if _MSVC_LANG > 201402L 52 # define PYBIND11_CPP17 53 # if _MSVC_LANG >= 202002L 54 # define PYBIND11_CPP20 61 #if defined(__INTEL_COMPILER) 62 # if __INTEL_COMPILER < 1800 63 # error pybind11 requires Intel C++ compiler v18 or newer 64 # elif __INTEL_COMPILER < 1900 && defined(PYBIND11_CPP14) 65 # error pybind11 supports only C++11 with Intel C++ compiler v18. Use v19 or newer for C++14. 69 # pragma warning disable 2196 // warning #2196: routine is both "inline" and "noinline" 70 #elif defined(__clang__) && !defined(__apple_build_version__) 71 # if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 3) 72 # error pybind11 requires clang 3.3 or newer 74 #elif defined(__clang__) 77 # if __clang_major__ < 5 78 # error pybind11 requires Xcode/clang 5.0 or newer 80 #elif defined(__GNUG__) 81 # if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) 82 # error pybind11 requires gcc 4.8 or newer 84 #elif defined(_MSC_VER) 86 # error pybind11 2.10+ requires MSVC 2017 or newer 90 #if !defined(PYBIND11_EXPORT) 91 # if defined(WIN32) || defined(_WIN32) 92 # define PYBIND11_EXPORT __declspec(dllexport) 94 # define PYBIND11_EXPORT __attribute__((visibility("default"))) 98 #if !defined(PYBIND11_EXPORT_EXCEPTION) 103 # define PYBIND11_EXPORT_EXCEPTION 105 # define PYBIND11_EXPORT_EXCEPTION PYBIND11_EXPORT 115 #if !defined(PYBIND11_NOINLINE_FORCED) \ 116 && (defined(__CUDACC__) || (defined(__GNUC__) && (__GNUC__ == 7 || __GNUC__ == 8))) 117 # define PYBIND11_NOINLINE_DISABLED 123 #if defined(PYBIND11_NOINLINE_DISABLED) // Option for maximum portability and experimentation. 124 # define PYBIND11_NOINLINE inline 125 #elif defined(_MSC_VER) 126 # define PYBIND11_NOINLINE __declspec(noinline) inline 128 # define PYBIND11_NOINLINE __attribute__((noinline)) inline 131 #if defined(__MINGW32__) 134 # define PYBIND11_DEPRECATED(reason) 135 #elif defined(PYBIND11_CPP14) 136 # define PYBIND11_DEPRECATED(reason) [[deprecated(reason)]] 138 # define PYBIND11_DEPRECATED(reason) __attribute__((deprecated(reason))) 141 #if defined(PYBIND11_CPP17) 142 # define PYBIND11_MAYBE_UNUSED [[maybe_unused]] 143 #elif defined(_MSC_VER) && !defined(__clang__) 144 # define PYBIND11_MAYBE_UNUSED 146 # define PYBIND11_MAYBE_UNUSED __attribute__((__unused__)) 151 #if defined(_MSC_VER) 152 # define HAVE_SNPRINTF 1 156 #if defined(_MSC_VER) 157 # pragma warning(push) 159 # pragma warning(disable : 4505) 160 # if defined(_DEBUG) && !defined(Py_DEBUG) 166 # if _MSVC_STL_VERSION >= 143 167 # include <crtdefs.h> 169 # define PYBIND11_DEBUG_MARKER 175 #if defined(__STDC_LIB_EXT1__) && !defined(__STDC_WANT_LIB_EXT1__) 176 # define __STDC_WANT_LIB_EXT1__ 181 # if defined(PYBIND11_CPP17) && __has_include(<optional>) 182 # define PYBIND11_HAS_OPTIONAL 1 185 # if defined(PYBIND11_CPP14) && (__has_include(<experimental/optional>) && \ 186 !__has_include(<optional>)) 187 # define PYBIND11_HAS_EXP_OPTIONAL 1 190 # if defined(PYBIND11_CPP17) && __has_include(<variant>) 191 # define PYBIND11_HAS_VARIANT 1 193 #elif defined(_MSC_VER) && defined(PYBIND11_CPP17) 194 # define PYBIND11_HAS_OPTIONAL 1 195 # define PYBIND11_HAS_VARIANT 1 198 #if defined(PYBIND11_CPP17) 199 # if defined(__has_include) 200 # if __has_include(<string_view>) 201 # define PYBIND11_HAS_STRING_VIEW 203 # elif defined(_MSC_VER) 204 # define PYBIND11_HAS_STRING_VIEW 208 #if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L 209 # define PYBIND11_HAS_U8STRING 213 #if PY_VERSION_HEX < 0x03060000 214 # error "PYTHON < 3.6 IS UNSUPPORTED. pybind11 v2.9 was the last to support Python 2 and 3.5." 216 #include <frameobject.h> 217 #include <pythread.h> 232 #if defined(copysign) 236 #if defined(_MSC_VER) 237 # if defined(PYBIND11_DEBUG_MARKER) 239 # undef PYBIND11_DEBUG_MARKER 241 # pragma warning(pop) 247 #include <forward_list> 251 #include <type_traits> 253 #include <unordered_map> 254 #include <unordered_set> 256 #if defined(__has_include) 257 # if __has_include(<version>) 276 #define PYBIND11_INSTANCE_METHOD_NEW(ptr, class_) PyInstanceMethod_New(ptr) 277 #define PYBIND11_INSTANCE_METHOD_CHECK PyInstanceMethod_Check 278 #define PYBIND11_INSTANCE_METHOD_GET_FUNCTION PyInstanceMethod_GET_FUNCTION 279 #define PYBIND11_BYTES_CHECK PyBytes_Check 280 #define PYBIND11_BYTES_FROM_STRING PyBytes_FromString 281 #define PYBIND11_BYTES_FROM_STRING_AND_SIZE PyBytes_FromStringAndSize 282 #define PYBIND11_BYTES_AS_STRING_AND_SIZE PyBytes_AsStringAndSize 283 #define PYBIND11_BYTES_AS_STRING PyBytes_AsString 284 #define PYBIND11_BYTES_SIZE PyBytes_Size 285 #define PYBIND11_LONG_CHECK(o) PyLong_Check(o) 286 #define PYBIND11_LONG_AS_LONGLONG(o) PyLong_AsLongLong(o) 287 #define PYBIND11_LONG_FROM_SIGNED(o) PyLong_FromSsize_t((ssize_t) (o)) 288 #define PYBIND11_LONG_FROM_UNSIGNED(o) PyLong_FromSize_t((size_t) (o)) 289 #define PYBIND11_BYTES_NAME "bytes" 290 #define PYBIND11_STRING_NAME "str" 291 #define PYBIND11_SLICE_OBJECT PyObject 292 #define PYBIND11_FROM_STRING PyUnicode_FromString 293 #define PYBIND11_STR_TYPE ::pybind11::str 294 #define PYBIND11_BOOL_ATTR "__bool__" 295 #define PYBIND11_NB_BOOL(ptr) ((ptr)->nb_bool) 296 #define PYBIND11_BUILTINS_MODULE "builtins" 299 #define PYBIND11_PLUGIN_IMPL(name) \ 300 extern "C" PYBIND11_MAYBE_UNUSED PYBIND11_EXPORT PyObject *PyInit_##name(); \ 301 extern "C" PYBIND11_EXPORT PyObject *PyInit_##name() 303 #define PYBIND11_TRY_NEXT_OVERLOAD ((PyObject *) 1) // special failure return code 304 #define PYBIND11_STRINGIFY(x) #x 305 #define PYBIND11_TOSTRING(x) PYBIND11_STRINGIFY(x) 306 #define PYBIND11_CONCAT(first, second) first##second 307 #define PYBIND11_ENSURE_INTERNALS_READY pybind11::detail::get_internals(); 309 #define PYBIND11_CHECK_PYTHON_VERSION \ 311 const char *compiled_ver \ 312 = PYBIND11_TOSTRING(PY_MAJOR_VERSION) "." PYBIND11_TOSTRING(PY_MINOR_VERSION); \ 313 const char *runtime_ver = Py_GetVersion(); \ 314 size_t len = std::strlen(compiled_ver); \ 315 if (std::strncmp(runtime_ver, compiled_ver, len) != 0 \ 316 || (runtime_ver[len] >= '0' && runtime_ver[len] <= '9')) { \ 317 PyErr_Format(PyExc_ImportError, \ 318 "Python version mismatch: module was compiled for Python %s, " \ 319 "but the interpreter version is incompatible: %s.", \ 326 #define PYBIND11_CATCH_INIT_EXCEPTIONS \ 327 catch (pybind11::error_already_set & e) { \ 328 pybind11::raise_from(e, PyExc_ImportError, "initialization failed"); \ 331 catch (const std::exception &e) { \ 332 PyErr_SetString(PyExc_ImportError, e.what()); \ 351 #define PYBIND11_PLUGIN(name) \ 352 PYBIND11_DEPRECATED("PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE") \ 353 static PyObject *pybind11_init(); \ 354 PYBIND11_PLUGIN_IMPL(name) { \ 355 PYBIND11_CHECK_PYTHON_VERSION \ 356 PYBIND11_ENSURE_INTERNALS_READY \ 358 return pybind11_init(); \ 360 PYBIND11_CATCH_INIT_EXCEPTIONS \ 362 PyObject *pybind11_init() 385 #define PYBIND11_MODULE(name, variable) \ 386 static ::pybind11::module_::module_def PYBIND11_CONCAT(pybind11_module_def_, name) \ 387 PYBIND11_MAYBE_UNUSED; \ 388 PYBIND11_MAYBE_UNUSED \ 389 static void PYBIND11_CONCAT(pybind11_init_, name)(::pybind11::module_ &); \ 390 PYBIND11_PLUGIN_IMPL(name) { \ 391 PYBIND11_CHECK_PYTHON_VERSION \ 392 PYBIND11_ENSURE_INTERNALS_READY \ 393 auto m = ::pybind11::module_::create_extension_module( \ 394 PYBIND11_TOSTRING(name), nullptr, &PYBIND11_CONCAT(pybind11_module_def_, name)); \ 396 PYBIND11_CONCAT(pybind11_init_, name)(m); \ 399 PYBIND11_CATCH_INIT_EXCEPTIONS \ 401 void PYBIND11_CONCAT(pybind11_init_, name)(::pybind11::module_ & (variable)) 406 using
size_t =
std::
size_t;
408 template <typename IntType>
410 static_assert(
sizeof(IntType) <=
sizeof(
ssize_t),
"Implicit narrowing is not permitted.");
411 return static_cast<ssize_t>(val);
468 inline static constexpr
int log2(
size_t n,
int k = 0) {
469 return (
n <= 1) ? k :
log2(
n >> 1, k + 1);
474 return 1 + ((s - 1) >>
log2(
sizeof(
void *)));
484 static_assert(
sizeof(std::shared_ptr<int>) >=
sizeof(std::unique_ptr<int>),
485 "pybind assumes std::shared_ptrs are at least as big as std::unique_ptrs");
543 void allocate_layout();
546 void deallocate_layout();
552 bool throw_if_missing =
true);
555 static constexpr
uint8_t status_holder_constructed = 1;
556 static constexpr
uint8_t status_instance_registered = 2;
560 "Internal error: `pybind11::detail::instance` is not standard layout!");
563 #if defined(PYBIND11_CPP14) 569 template <
bool B,
typename T =
void>
571 template <
bool B,
typename T,
typename F>
573 template <
typename T>
575 template <
typename T>
579 #if defined(PYBIND11_CPP20) 580 using std::remove_cvref;
592 #if defined(PYBIND11_CPP14) 593 using std::index_sequence;
598 template <
size_t N,
size_t...
S>
600 template <
size_t...
S>
609 template <
typename ISeq,
size_t,
bool...>
613 template <
size_t... IPrev,
size_t I,
bool B,
bool... Bs>
615 :
select_indices_impl<conditional_t<B, index_sequence<IPrev..., I>, index_sequence<IPrev...>>,
618 template <
bool... Bs>
624 template <
typename T>
630 #if defined(__PGIC__) || defined(__INTEL_COMPILER) 631 template <
typename...>
634 template <
typename...>
638 template <
typename... Ts>
643 #if defined(__cpp_fold_expressions) && !(defined(_MSC_VER) && (_MSC_VER < 1916)) 644 template <
class... Ts>
646 template <
class... Ts>
648 #elif !defined(_MSC_VER) 651 template <
class... Ts>
653 template <
class... Ts>
658 template <
class... Ts>
659 using all_of = std::conjunction<Ts...>;
660 template <
class... Ts>
661 using any_of = std::disjunction<Ts...>;
663 template <
class... Ts>
666 template <
class T,
template <
class>
class... Predicates>
668 template <
class T,
template <
class>
class... Predicates>
670 template <
class T,
template <
class>
class... Predicates>
674 template <
typename T>
676 template <
typename C,
typename R,
typename...
A>
680 template <
typename C,
typename R,
typename...
A>
686 template <
typename T>
690 template <
typename T>
694 template <
typename T>
698 template <
typename T>
702 template <
typename T>
706 template <
typename T,
size_t N>
710 template <
typename T,
size_t N>
714 template <
typename T>
721 template <
typename...>
725 #ifdef __cpp_fold_expressions 726 template <
typename... Ts>
728 return (0 + ... +
size_t{ns});
732 template <
typename T,
typename... Ts>
741 template <
typename T,
typename... Ts>
743 return v ?
i :
first(i + 1, vs...);
747 template <
typename T,
typename... Ts>
749 return last(i + 1, v ? i : result, vs...);
753 template <
template <
typename>
class Predicate,
typename... Ts>
761 template <
template <
typename>
class Predicate,
typename... Ts>
767 template <
size_t N,
typename T,
typename... Ts>
771 template <
typename T,
typename... Ts>
778 template <
template <
typename>
class Predicate,
typename Default,
typename... Ts>
781 static_assert(found <= 1,
"Found more than one type matching the predicate");
786 template <
template <
typename>
class P,
typename Default>
791 template <
template <
typename>
class Predicate,
typename Default,
typename... Ts>
795 template <
typename T,
typename... >
799 template <
typename T,
typename... Us>
804 template <
typename Base,
typename Derived>
811 template <
typename Base,
typename Derived>
816 template <
template <
typename...>
class Base>
818 template <
typename... Us>
820 static std::false_type
check(...);
825 template <
template <
typename...>
class Base,
typename T>
828 #if !defined(_MSC_VER) 833 : decltype(is_template_base_of_impl<Base>::check((intrinsic_t<T> *) nullptr)) {
839 template <
template <
typename...>
class Class,
typename T>
841 template <
template <
typename...>
class Class,
typename... Us>
845 template <
typename T>
849 template <
typename T,
typename =
void>
851 template <
typename T>
853 void_t<decltype(*std::declval<T &>()), decltype(++std::declval<T &>())>>
856 template <
typename T>
861 template <
typename F>
871 template <
typename Function,
typename F = remove_reference_t<Function>>
876 std::remove_pointer<F>,
882 template <
typename T>
886 std::is_member_pointer>;
890 #if defined(__cpp_fold_expressions) && !defined(__INTEL_COMPILER) 892 # define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) (((PATTERN), void()), ...) 895 # define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) \ 896 (void) pybind11::detail::expand_side_effects { ((PATTERN), void(), false)..., false } 901 #if defined(_MSC_VER) 902 # pragma warning(push) 903 # pragma warning(disable : 4275) 910 using std::runtime_error::runtime_error;
912 virtual void set_error()
const = 0;
914 #if defined(_MSC_VER) 915 # pragma warning(pop) 918 #define PYBIND11_RUNTIME_EXCEPTION(name, type) \ 919 class PYBIND11_EXPORT_EXCEPTION name : public builtin_exception { \ 921 using builtin_exception::builtin_exception; \ 922 name() : name("") {} \ 923 void set_error() const override { PyErr_SetString(type, what()); } \ 940 assert(!PyErr_Occurred());
941 throw std::runtime_error(reason);
944 assert(!PyErr_Occurred());
945 throw std::runtime_error(reason);
948 template <
typename T,
typename SFINAE =
void>
957 template <
typename T,
typename SFINAE =
void>
959 static constexpr
bool value =
false;
961 template <
typename T>
964 static constexpr
int index
977 template <
typename T>
979 static constexpr
const char c =
"?bBhHiIqQfdg"[detail::is_fmt_numeric<T>::index];
980 static constexpr
const char value[2] = {
c,
'\0'};
981 static std::string
format() {
return std::string(1, c); }
984 #if !defined(PYBIND11_CPP17) 986 template <
typename T>
1003 template <
typename T>
1008 template <
typename... Args>
1010 template <
typename Return>
1011 constexpr
auto operator()(Return (*pf)(Args...)) const noexcept -> decltype(pf) {
1015 template <
typename Return,
typename Class>
1016 constexpr
auto operator()(Return (
Class::*pmf)(Args...), std::false_type = {}) const noexcept
1021 template <
typename Return,
typename Class>
1022 constexpr
auto operator()(Return (
Class::*pmf)(Args...)
const, std::true_type)
const noexcept
1030 #if defined(PYBIND11_CPP14) 1031 # define PYBIND11_OVERLOAD_CAST 1 1032 template <
typename... Args>
1036 # if (defined(_MSC_VER) && _MSC_VER < 1920) \ 1037 || (defined(__clang__) && __clang_major__ == 5) 1038 static constexpr detail::overload_cast_impl<Args...>
overload_cast = {};
1040 static constexpr detail::overload_cast_impl<Args...>
overload_cast;
1047 static constexpr
auto const_ = std::true_type{};
1049 #if !defined(PYBIND11_CPP14) // no overload_cast: providing something that static_assert-fails: 1050 template <
typename... Args>
1053 "pybind11::overload_cast<...> requires compiling in C++14 mode");
1055 #endif // overload_cast 1062 template <
typename T>
1075 template <
typename Container,
1077 std::is_convertible<decltype(*std::begin(std::declval<const Container &>())),
1093 operator std::vector<T> &&() && {
return std::move(v); }
1107 template <
typename T>
1108 inline static std::shared_ptr<T>
1114 #if defined(__cpp_lib_enable_shared_from_this) && (!defined(_MSC_VER) || _MSC_VER >= 1912) 1115 return holder_value_ptr->weak_from_this().lock();
1118 return holder_value_ptr->shared_from_this();
1119 }
catch (
const std::bad_weak_ptr &) {
1126 template <
typename... Args>
1127 #if defined(_MSC_VER) && _MSC_VER < 1920 // MSVC 2017 1135 #if defined(_MSC_VER) && _MSC_VER <= 1916 1136 # define PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(...) \ 1137 detail::silence_unused_warnings(__VA_ARGS__) 1139 # define PYBIND11_WORKAROUND_INCORRECT_MSVC_C4100(...) 1143 #if defined(__GNUG__) && !defined(__clang__) && !defined(__INTEL_COMPILER) 1144 # define PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(...) \ 1145 detail::silence_unused_warnings(__VA_ARGS__) 1147 # define PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER(...) 1150 #if defined(_MSC_VER) // All versions (as of July 2021). 1153 constexpr
inline bool silence_msvc_c4127(
bool cond) {
return cond; }
1155 # define PYBIND11_SILENCE_MSVC_C4127(...) ::pybind11::detail::silence_msvc_c4127(__VA_ARGS__) 1158 # define PYBIND11_SILENCE_MSVC_C4127(...) __VA_ARGS__ 1164 #if !defined(PYBIND11_DETAILED_ERROR_MESSAGES) && !defined(NDEBUG) 1165 # define PYBIND11_DETAILED_ERROR_MESSAGES typename std::conditional< B, T, F >::type conditional_t
bool simple_holder_constructed
For simple layout, tracks whether the holder has been constructed.
Helper template which holds a list of types.
bool has_patients
If true, get_internals().patients has an entry for this object.
PyObject * weakrefs
Weak references.
any_container(std::vector< T > &&v)
constexpr auto operator()(Return(*pf)(Args...)) const noexcept -> decltype(pf)
constexpr int last(int, int result)
Helper template to strip away type modifiers.
remove_cv_t< remove_reference_t< T > > type
any_container(const std::initializer_list< TIn > &c)
const std::vector< T > & operator*() const
void silence_unused_warnings(Args &&...)
std::vector< T > * operator->()
bool[] expand_side_effects
Apply a function over each element of a parameter pack.
constexpr size_t instance_simple_holder_in_ptrs()
typename std::remove_cv< T >::type remove_cv_t
std::string get_fully_qualified_tp_name(PyTypeObject *)
typename remove_cvref< T >::type remove_cvref_t
bool_constant< std::is_pointer< T >::value &&std::is_function< typename std::remove_pointer< T >::type >::value > is_function_pointer
Rot2 R(Rot2::fromAngle(0.1))
decltype(is_template_base_of_impl< Base >::check((intrinsic_t< T > *) nullptr)) is_template_base_of
Compile-time all/any/none of that check the boolean value of all template types.
static constexpr size_t size_in_ptrs(size_t s)
typename exactly_one< Predicate, Default, Ts... >::type exactly_one_t
Strip the class from a method type.
#define PYBIND11_NAMESPACE
The 'instance' type which needs to be standard layout (need to be able to use 'offsetof') ...
constexpr size_t constexpr_sum()
Compile-time integer sum.
PyExc_RuntimeError [[noreturn]] PYBIND11_NOINLINE void pybind11_fail(const char *reason)
Used internally.
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 > function_signature_t
static constexpr auto const_
constexpr int constexpr_first()
all_of< Predicates< T >... > satisfies_all_of
typename select_indices_impl< index_sequence<>, 0, Bs... >::type select_indices
ssize_t ssize_t_cast(const IntType &val)
constexpr int first(int i)
Implementation details for constexpr functions.
Array< int, Dynamic, 1 > v
std::integral_constant< bool, B > bool_constant
Backports of std::bool_constant and std::negation to accommodate older compilers. ...
Eigen::Triplet< double > T
any_container(const Container &c)
Make an index sequence of the indices of true arguments.
typename std::remove_reference< T >::type remove_reference_t
any_container(It first, It last)
typename void_t_impl< Ts... >::type void_t
Defer the evaluation of type T until types Us are instantiated.
Helper type to replace 'void' in some expressions.
Matrix< Scalar, Dynamic, Dynamic > C
constexpr int constexpr_last()
Return the index of the last type in Ts which satisfies Predicate<T>, or -1 if none match...
bool owned
If true, the pointer is owned which means we're free to manage it with a holder.
std::is_same< bools< Ts::value..., true >, bools< true, Ts::value... > > all_of
#define PYBIND11_EXPORT_EXCEPTION
constexpr auto operator()(Return(Class::*pmf)(Args...) const, std::true_type) const noexcept -> decltype(pmf)
void check(bool b, bool ref)
void ** values_and_holders
typename intrinsic_type< T >::type intrinsic_t
constexpr auto operator()(Return(Class::*pmf)(Args...), std::false_type={}) const noexcept -> decltype(pmf)
RAII wrapper that temporarily clears any Python error state.
typename deferred_type< T, Us... >::type deferred_t
bool simple_instance_registered
For simple layout, tracks whether the instance is registered in registered_instances ...
static EIGEN_DEPRECATED const end_t end
Dummy destructor wrapper that can be used to expose classes with a private destructor.
bool_constant< std::is_base_of< Base, Derived >::value &&!std::is_same< Base, Derived >::value > is_strict_base_of
static constexpr int log2(size_t n, int k=0)
static std::shared_ptr< T > try_get_shared_from_this(std::enable_shared_from_this< T > *holder_value_ptr)
C++ bindings of builtin Python exceptions.
typename std::enable_if< B, T >::type enable_if_t
from cpp_future import (convenient aliases from C++14/17)
#define PYBIND11_RUNTIME_EXCEPTION(name, type)
std::vector< T > & operator*()
typename make_index_sequence_impl< N >::type make_index_sequence
#define PYBIND11_NOINLINE
return_value_policy
Approach used to cast a previously unknown C++ instance into a Python object.
nonsimple_values_and_holders nonsimple
#define PYBIND11_NAMESPACE_END(name)
const std::vector< T > * operator->() const
#define PYBIND11_NAMESPACE_BEGIN(name)
Return the Nth element from the parameter pack.
bool_constant<(std::is_same< Base, Derived >::value||std::is_base_of< Base, Derived >::value) &&std::is_convertible< Derived *, Base * >::value > is_accessible_base_of