Sergey Lyskov | eae7744 | 2016-05-07 00:26:19 -0400 | [diff] [blame] | 1 | /* |
| 2 | example/example17.cpp -- Usade of stl_binders functions |
| 3 | |
| 4 | Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch> |
| 5 | |
| 6 | All rights reserved. Use of this source code is governed by a |
| 7 | BSD-style license that can be found in the LICENSE file. |
| 8 | */ |
| 9 | |
| 10 | #include "example.h" |
| 11 | |
| 12 | #include <pybind11/stl_binders.h> |
| 13 | |
| 14 | class A |
| 15 | { |
| 16 | public: |
| 17 | A() = delete; |
| 18 | }; |
| 19 | |
| 20 | void init_ex17(py::module &m) |
| 21 | { |
| 22 | pybind11::class_<A>(m, "A"); |
| 23 | |
| 24 | py::vector_binder<int>(m, "VectorInt"); |
| 25 | |
| 26 | py::vector_binder<A>(m, "VectorA"); |
| 27 | } |