mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-13 09:46:10 +00:00
adding stl_binders
This commit is contained in:
committed by
Wenzel Jakob
parent
178c8a899d
commit
eae7744c0e
27
example/example17.cpp
Normal file
27
example/example17.cpp
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user