mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-23 16:16:29 +01:00
Hardcopy of pybind11 instead of using git submodules (#552)
* removed pybind as submodule * added hardcopy of pybind11 2.10.0 * rename pybind11 folder to avoid conflicts when changing branch Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
This commit is contained in:
22
libs/pybind/tests/test_union.cpp
Normal file
22
libs/pybind/tests/test_union.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
tests/test_class.cpp -- test py::class_ definitions and basic functionality
|
||||
|
||||
Copyright (c) 2019 Roland Dreier <roland.dreier@gmail.com>
|
||||
|
||||
All rights reserved. Use of this source code is governed by a
|
||||
BSD-style license that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "pybind11_tests.h"
|
||||
|
||||
TEST_SUBMODULE(union_, m) {
|
||||
union TestUnion {
|
||||
int value_int;
|
||||
unsigned value_uint;
|
||||
};
|
||||
|
||||
py::class_<TestUnion>(m, "TestUnion")
|
||||
.def(py::init<>())
|
||||
.def_readonly("as_int", &TestUnion::value_int)
|
||||
.def_readwrite("as_uint", &TestUnion::value_uint);
|
||||
}
|
||||
Reference in New Issue
Block a user