adding stl_binders

This commit is contained in:
Sergey Lyskov
2016-05-07 00:26:19 -04:00
committed by Wenzel Jakob
parent 178c8a899d
commit eae7744c0e
6 changed files with 240 additions and 0 deletions

27
example/example17.cpp Normal file
View File

@@ -0,0 +1,27 @@
/*
example/example17.cpp -- Usade of stl_binders functions
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
*/
#include "example.h"
#include <pybind11/stl_binders.h>
class A
{
public:
A() = delete;
};
void init_ex17(py::module &m)
{
pybind11::class_<A>(m, "A");
py::vector_binder<int>(m, "VectorInt");
py::vector_binder<A>(m, "VectorA");
}