15 return "test_function()";
19 return "test_function(enum=" + std::to_string(k) +
")";
23 return "test_function(" + std::to_string(i) +
")";
32 const char *
data =
"\x01\x00\x02\x00";
33 return std::string(data, 4);
37 std::string
ret =
"bytes[";
38 const auto value =
static_cast<std::string
>(bytes);
39 for (
size_t i = 0;
i <
value.length(); ++
i) {
40 ret += std::to_string(static_cast<int>(
value[
i])) +
" ";
49 int f1(
int x) noexcept {
return x+1; }
50 int f2(
int x) noexcept(
true) {
return x+2; }
51 int f3(
int x) noexcept(
false) {
return x+3; }
53 # pragma GCC diagnostic push 54 # pragma GCC diagnostic ignored "-Wdeprecated" 56 int f4(
int x)
throw() {
return x+4; }
58 # pragma GCC diagnostic pop 61 int m1(
int x) noexcept {
return x-1; }
62 int m2(
int x)
const noexcept {
return x-2; }
63 int m3(
int x) noexcept(
true) {
return x-3; }
64 int m4(
int x)
const noexcept(
true) {
return x-4; }
65 int m5(
int x) noexcept(
false) {
return x-5; }
66 int m6(
int x)
const noexcept(
false) {
return x-6; }
68 # pragma GCC diagnostic push 69 # pragma GCC diagnostic ignored "-Wdeprecated" 71 int m7(
int x)
throw() {
return x-7; }
72 int m8(
int x)
const throw() {
return x-8; }
74 # pragma GCC diagnostic pop 82 m.attr(
"some_constant") = py::int_(14);
89 #if defined(PYBIND11_OVERLOAD_CAST) 101 py::enum_<MyEnum>(
m,
"MyEnum")
112 py::class_<C>(
m,
"C")
int f3(int x) noexcept(false)
int m2(int x) const noexcept
int m6(int x) const noexcept(false)
std::string test_function1()
int f2(int x) noexcept(true)
std::string print_bytes(py::bytes bytes)
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)