test_unnamed_namespace_a.cpp
Go to the documentation of this file.
1 #include "pybind11_tests.h"
2 
3 namespace {
4 struct any_struct {};
5 } // namespace
6 
7 TEST_SUBMODULE(unnamed_namespace_a, m) {
8  if (py::detail::get_type_info(typeid(any_struct)) == nullptr) {
9  py::class_<any_struct>(m, "unnamed_namespace_a_any_struct");
10  } else {
11  m.attr("unnamed_namespace_a_any_struct") = py::none();
12  }
13  m.attr("PYBIND11_INTERNALS_VERSION") = PYBIND11_INTERNALS_VERSION;
14  m.attr("defined_WIN32_or__WIN32") =
15 #if defined(WIN32) || defined(_WIN32)
16  true;
17 #else
18  false;
19 #endif
20  m.attr("defined___clang__") =
21 #if defined(__clang__)
22  true;
23 #else
24  false;
25 #endif
26  m.attr("defined__LIBCPP_VERSION") =
27 #if defined(_LIBCPP_VERSION)
28  true;
29 #else
30  false;
31 #endif
32  m.attr("defined___GLIBCXX__") =
33 #if defined(__GLIBCXX__)
34  true;
35 #else
36  false;
37 #endif
38 }
TEST_SUBMODULE
TEST_SUBMODULE(unnamed_namespace_a, m)
Definition: test_unnamed_namespace_a.cpp:7
get_type_info
PYBIND11_NOINLINE detail::type_info * get_type_info(PyTypeObject *type)
Definition: type_caster_base.h:188
m
Matrix3f m
Definition: AngleAxis_mimic_euler.cpp:1
PYBIND11_INTERNALS_VERSION
#define PYBIND11_INTERNALS_VERSION
Definition: internals.h:44
pybind11_tests.h


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:39:32