mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
minor doc & style fixes
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include "pybind11_tests.h"
|
||||
|
||||
#include <pybind11/stl_bind.h>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
class El {
|
||||
public:
|
||||
@@ -28,18 +30,18 @@ test_initializer stl_binder_vector([](py::module &m) {
|
||||
py::class_<El>(m, "El")
|
||||
.def(py::init<int>());
|
||||
|
||||
py::bind_vector< std::vector<unsigned int> >(m, "VectorInt");
|
||||
py::bind_vector< std::vector<bool> >(m, "VectorBool");
|
||||
py::bind_vector<std::vector<unsigned int>>(m, "VectorInt");
|
||||
py::bind_vector<std::vector<bool>>(m, "VectorBool");
|
||||
|
||||
py::bind_vector< std::vector<El> >(m, "VectorEl");
|
||||
py::bind_vector<std::vector<El>>(m, "VectorEl");
|
||||
|
||||
py::bind_vector< std::vector< std::vector<El> > >(m, "VectorVectorEl");
|
||||
py::bind_vector<std::vector<std::vector<El>>>(m, "VectorVectorEl");
|
||||
});
|
||||
|
||||
test_initializer stl_binder_map([](py::module &m) {
|
||||
py::bind_map< std::map<std::string, double> >(m, "MapStringDouble");
|
||||
py::bind_map< std::unordered_map<std::string, double> >(m, "UnorderedMapStringDouble");
|
||||
py::bind_map<std::map<std::string, double>>(m, "MapStringDouble");
|
||||
py::bind_map<std::unordered_map<std::string, double>>(m, "UnorderedMapStringDouble");
|
||||
|
||||
py::bind_map< std::map<std::string, double const> >(m, "MapStringDoubleConst");
|
||||
py::bind_map< std::unordered_map<std::string, double const> >(m, "UnorderedMapStringDoubleConst");
|
||||
py::bind_map<std::map<std::string, double const>>(m, "MapStringDoubleConst");
|
||||
py::bind_map<std::unordered_map<std::string, double const>>(m, "UnorderedMapStringDoubleConst");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user