19 std::string
test_function3(
int i) {
return "test_function(" + std::to_string(i) +
")"; }
27 const char *
data =
"\x01\x00\x02\x00";
28 return std::string(data, 4);
32 std::string
ret =
"bytes[";
33 const auto value =
static_cast<std::string
>(bytes);
35 ret += std::to_string(static_cast<int>(
c)) +
' ';
48 #if defined(__INTEL_COMPILER) && defined(PYBIND11_CPP17) 49 int f1(
int x) noexcept(
true) {
return x + 1; }
51 int f1(
int x) noexcept {
return x + 1; }
53 int f2(
int x) noexcept(
true) {
return x + 2; }
54 int f3(
int x) noexcept(
false) {
return x + 3; }
55 #if defined(__GNUG__) && !defined(__INTEL_COMPILER) 56 # pragma GCC diagnostic push 57 # pragma GCC diagnostic ignored "-Wdeprecated" 60 int f4(
int x)
throw() {
return x + 4; }
61 #if defined(__GNUG__) && !defined(__INTEL_COMPILER) 62 # pragma GCC diagnostic pop 65 int m1(
int x) noexcept {
return x - 1; }
66 int m2(
int x)
const noexcept {
return x - 2; }
67 int m3(
int x) noexcept(
true) {
return x - 3; }
68 int m4(
int x)
const noexcept(
true) {
return x - 4; }
69 int m5(
int x) noexcept(
false) {
return x - 5; }
70 int m6(
int x)
const noexcept(
false) {
return x - 6; }
71 #if defined(__GNUG__) && !defined(__INTEL_COMPILER) 72 # pragma GCC diagnostic push 73 # pragma GCC diagnostic ignored "-Wdeprecated" 76 int m7(
int x)
throw() {
return x - 7; }
78 int m8(
int x)
const throw() {
return x - 8; }
79 #if defined(__GNUG__) && !defined(__INTEL_COMPILER) 80 # pragma GCC diagnostic pop 87 m.attr(
"some_constant") = py::int_(14);
94 #if defined(PYBIND11_OVERLOAD_CAST) 106 py::enum_<MyEnum>(
m,
"MyEnum")
117 py::class_<C>(
m,
"C")
129 #if defined(__INTEL_COMPILER) 130 # pragma warning push 131 # pragma warning disable 878 // incompatible exception specifications 134 #if defined(__INTEL_COMPILER) 140 m.def(
"register_large_capture_with_invalid_arguments", [](py::module_ m) {
144 #if defined(__GNUC__) && __GNUC__ == 4 // CentOS7 148 "should_raise", [capture](
int) {
return capture[9] + 33; }, py::kw_only(),
py::arg());
150 m.def(
"register_with_raising_repr", [](py::module_ m,
const py::object &default_value) {
153 [](
int,
int,
const py::object &) {
return 42; },
156 py::arg_v(
"y", 42,
"<the answer>"),
157 py::arg_v(
"z", default_value));
int f3(int x) noexcept(false)
void silence_unused_warnings(Args &&...)
int m2(int x) const noexcept
int m6(int x) const noexcept(false)
std::string test_function1()
std::string print_bytes(const py::bytes &bytes)
int f2(int x) noexcept(true)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArgReturnType arg() const
unsigned __int64 uint64_t
int m5(int x) noexcept(false)
int m4(int x) const noexcept(true)
int m3(int x) noexcept(true)
TEST_SUBMODULE(constants_and_functions, m)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
std::string test_function2(MyEnum k)
std::string test_function3(int i)