diff --git a/source/binder.cpp b/source/binder.cpp index 098d30ed..ce341637 100644 --- a/source/binder.cpp +++ b/source/binder.cpp @@ -258,9 +258,15 @@ int main(int argc, const char **argv) #else //CommonOptionsParser op(argc, argv, BinderToolCategory); - llvm::Expected< CommonOptionsParser > eop = CommonOptionsParser::create(argc, argv, BinderToolCategory); - ClangTool tool(eop->getCompilations(), eop->getSourcePathList()); - return tool.run(newFrontendActionFactory().get()); + if( llvm::Expected< CommonOptionsParser > eop = CommonOptionsParser::create(argc, argv, BinderToolCategory) ) { + ClangTool tool(eop->getCompilations(), eop->getSourcePathList()); + return tool.run(newFrontendActionFactory().get()); + } + else { + auto errs = eop.takeError(); + llvm::logAllUnhandledErrors(std::move(errs), outs(), "\nErrors:\n"); + return 1; + } #endif } diff --git a/source/class.cpp b/source/class.cpp index 570306a9..6086d704 100644 --- a/source/class.cpp +++ b/source/class.cpp @@ -338,7 +338,10 @@ bool is_binding_requested(clang::CXXRecordDecl const *C, Config const &config) // check if user requested skipping for the given declaration bool is_skipping_requested(clang::CXXRecordDecl const *C, Config const &config) { - bool skip = config.is_class_skipping_requested( standard_name( C->getQualifiedNameAsString() ) ) or config.is_class_skipping_requested( class_qualified_name(C) ) or config.is_namespace_skipping_requested( namespace_from_named_decl(C) ); + bool skip = \ + config.is_class_skipping_requested( standard_name( C->getQualifiedNameAsString() ) ) or + config.is_class_skipping_requested( class_qualified_name(C) ) or + config.is_namespace_skipping_requested( namespace_from_named_decl(C) ); for(auto & t : get_type_dependencies(C) ) skip |= is_skipping_requested(t, config); diff --git a/source/fmt/os.h b/source/fmt/os.h index d44ea0c9..64f75d23 100644 --- a/source/fmt/os.h +++ b/source/fmt/os.h @@ -375,7 +375,7 @@ struct ostream_params { }; } // namespace detail -static constexpr detail::buffer_size buffer_size; +static constexpr detail::buffer_size buffer_size(); // A fast output stream which is not thread-safe. class ostream final : private detail::buffer { diff --git a/source/type.cpp b/source/type.cpp index 966b780f..5ad492e9 100644 --- a/source/type.cpp +++ b/source/type.cpp @@ -523,32 +523,40 @@ string simplify_std_class_name(string const &type) if( regex_map.empty() ) { vector< std::pair > regex_arg_map = { - make_pair("^list<(.*),std::allocator<\\1>>$", "list<\\1>"), - make_pair("^deque<(.*),std::allocator<\\1>>$", "deque<\\1>"), - make_pair("^vector<(.*),std::allocator<\\1>>$", "vector<\\1>"), - make_pair("^set<(.*),std::less<\\1>,std::allocator<\\1>>$", "set<\\1>"), - make_pair("^forward_list<(.*),std::allocator<\\1>>$", "forward_list<\\1>"), - make_pair("^map<(.*),(.*),std::less<\\1>,std::allocator >>$", "map<\\1,\\2>"), + make_pair("list<(.*), *std::allocator<\\1 *> *>", "list<\\1>"), + make_pair("deque<(.*), *std::allocator<\\1 *> *>", "deque<\\1>"), - make_pair("^multiset<(.*),std::less<(.*)>,std::allocator<(.*)>>$", "multiset<\\1>"), - make_pair("^multimap<(.*),(.*),std::less<\\1>,std::allocator >>$", "multimap<\\1,\\2>"), + make_pair("vector<(.*), *std::allocator<\\1 *> *>", "vector<\\1>"), + + make_pair("set<(.*), *std::less<\\1 *>, *std::allocator<\\1 *> *>", "set<\\1>"), + make_pair("forward_list<(.*), *std::allocator<\\1 *> *>", "forward_list<\\1>"), + make_pair("map<(.*),(.*), *std::less<\\1 *>, *std::allocator *> *>", "map<\\1,\\2>"), + + make_pair("multiset<(.*), *std::less<(.*)>, *std::allocator<(.*)>>", "multiset<\\1 *>"), + make_pair("multimap<(.*),(.*), *std::less<\\1>, *std::allocator *> *>", "multimap<\\1,\\2>"), // LLVM-3.7 //make_pair("^std::multimap<(.*),(.*),std::less<\\1>,std::allocator >>", "multimap<\\1,\\2>"), - make_pair("^unordered_set<(.*),std::hash<\\1>,std::equal_to<\\1>,std::allocator<\\1>>$", "unordered_set<\\1>"), - make_pair("^unordered_map<(.*),(.*),std::hash<\\1>,std::equal_to<\\1>,std::allocator >>$", "unordered_map<\\1,\\2>"), + make_pair("unordered_set<(.*), *std::hash<\\1>,std::equal_to<\\1>,std::allocator<\\1>>", "unordered_set<\\1>"), + make_pair("unordered_map<(.*), *(.*),std::hash<\\1>,std::equal_to<\\1>,std::allocator *> *>", "unordered_map<\\1,\\2>"), - make_pair("^unordered_multiset<(.*),std::hash<\\1>,std::equal_to<\\1>,std::allocator<\\1>>$", "unordered_multiset<\\1>"), - make_pair("^unordered_multimap<(.*),(.*),std::hash<\\1>,std::equal_to<\\1>,std::allocator >>$", "unordered_multimap<\\1,\\2>"), + make_pair("unordered_multiset<(.*), *std::hash<\\1>, *std::equal_to<\\1>, *std::allocator<\\1 *> *>", "unordered_multiset<\\1>"), + make_pair("unordered_multimap<(.*), *(.*),std::hash<\\1 *>, *std::equal_to<\\1 *>, *std::allocator *> *>", "unordered_multimap<\\1,\\2>"), }; for(auto & p : regex_arg_map) regex_map.emplace_back(llvm::Regex(p.first), p.second); } - for(auto & p : regex_map) { - //llvm::Regex R(p.first); - res = p.first.sub(p.second, res); + int len = res.size(), previous_len = 0; + + while( len != previous_len ) { + for(auto & p : regex_map) { + //llvm::Regex R(p.first); + res = p.first.sub(p.second, res); + } + previous_len = len; + len = res.size(); } return res; diff --git a/test/T15.inner_class.fwd.ref b/test/T15.inner_class.fwd.ref index 19ebec64..213507ee 100644 --- a/test/T15.inner_class.fwd.ref +++ b/test/T15.inner_class.fwd.ref @@ -17,26 +17,26 @@ void bind_T15_inner_class_fwd(std::function< pybind11::module &(std::string const &namespace_) > &M) { - { // outer file:T15.inner_class.fwd.hpp line:11 - pybind11::class_> cl(M(""), "outer", "binder/test/T15.inner_class.fwd.hpp\n \n\n Binder self-test file. Tests for bindings of forward declared inner functions.\n \n\n Thomas Feierl"); + { // outer file:T15.inner_class.fwd.hpp line:10 + pybind11::class_> cl(M(""), "outer", "binder/test/T15.inner_class.fwd.hpp\n \n\n Binder self-test file. Tests for bindings of forward declared inner functions."); cl.def( pybind11::init( [](){ return new outer(); } ) ); cl.def("f", (void (outer::*)(struct outer::inner *, struct outer::inner2 *, struct outer::inner3 *)) &outer::f, "C++: outer::f(struct outer::inner *, struct outer::inner2 *, struct outer::inner3 *) --> void", pybind11::arg("i"), pybind11::arg("i2"), pybind11::arg("i3")); - { // outer::inner file:T15.inner_class.fwd.hpp line:13 + { // outer::inner file:T15.inner_class.fwd.hpp line:12 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "inner", ""); cl.def( pybind11::init( [](){ return new outer::inner(); } ) ); cl.def_readwrite("a", &outer::inner::a); } - { // outer::inner2 file:T15.inner_class.fwd.hpp line:23 + { // outer::inner2 file:T15.inner_class.fwd.hpp line:22 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "inner2", ""); cl.def( pybind11::init( [](){ return new outer::inner2(); } ) ); cl.def_readwrite("b", &outer::inner2::b); } - { // outer::inner3 file:T15.inner_class.fwd.hpp line:28 + { // outer::inner3 file:T15.inner_class.fwd.hpp line:27 auto & enclosing_class = cl; pybind11::class_> cl(enclosing_class, "inner3", ""); cl.def( pybind11::init( [](){ return new outer::inner3(); } ) ); @@ -82,9 +82,9 @@ PYBIND11_MODULE(T15_inner_class_fwd, root_module) { } -// Source list file: /home/thomas/Projects/thfe/binder/build/test//T15_inner_class_fwd.sources +// Source list file: TEST/T15_inner_class_fwd.sources // T15_inner_class_fwd.cpp // T15_inner_class_fwd.cpp -// Modules list file: /home/thomas/Projects/thfe/binder/build/test//T15_inner_class_fwd.modules +// Modules list file: TEST/T15_inner_class_fwd.modules // diff --git a/test/T17.anonymous.ref b/test/T17.anonymous.ref index 3a329e1f..c2e2eb2a 100644 --- a/test/T17.anonymous.ref +++ b/test/T17.anonymous.ref @@ -1,4 +1,6 @@ // File: T17_anonymous.cpp +#include // Anonymous +#include // Anonymous::(anonymous) #include // S #include // S::_D #include // _S2 @@ -42,14 +44,14 @@ void bind_T17_anonymous(std::function< pybind11::module &(std::string const &nam pybind11::class_<_S2, std::shared_ptr<_S2>> cl(M(""), "_S2", ""); cl.def( pybind11::init( [](){ return new _S2(); } ) ); cl.def_readwrite("a", &_S2::a); - } + } { // Anonymous file:T17.anonymous.hpp line:56 pybind11::class_> cl(M(""), "Anonymous", ""); - cl.def( pybind11::init( [](){ return new Anonymous(); } ) ); - - { // Anonymous::(anonymous) file: line:58 + cl.def( pybind11::init( [](){ return new Anonymous(); } ) ); + + { // Anonymous::(anonymous) file:T17.anonymous.hpp line:58 - { // Anonymous::(anonymous union)::(anonymous) file: line:60 + { // Anonymous::(anonymous union)::(anonymous) file:T17.anonymous.hpp line:60 cl.def_readwrite("x", &Anonymous::x); cl.def_readwrite("y", &Anonymous::y); } diff --git a/test/T42.stl.names.hpp b/test/T42.stl.names.hpp index 8163d6d9..a5605728 100644 --- a/test/T42.stl.names.hpp +++ b/test/T42.stl.names.hpp @@ -11,7 +11,7 @@ /// @author Sergey Lyskov /// The multimap/multiset classes are tested in the binder/test/T43.stl.names.multi.hpp to avoid -/// problems with different ordering of multiset/set and multimap/map bindings +/// problems with different ordering of multiset/set and multimap/map bindings /// in the generated files on different platforms. #ifndef _INCLUDED_T42_stl_names_hpp_ #define _INCLUDED_T42_stl_names_hpp_ @@ -22,12 +22,15 @@ #include #include - void foo(std::list ) {} void foo(std::forward_list ) {} void foo(std::vector ) {} void foo(std::deque ) {} +void foo(std::vector< std::vector >) {} +void foo(std::vector< std::vector< std::vector > >) {} + +void foo(std::vector< std::list< std::forward_list< std::deque > > >) {} #endif // _INCLUDED_T42_stl_names_hpp_ diff --git a/test/T42.stl.names.map.hpp b/test/T42.stl.names.map.hpp index 2311c041..fcf6b7b2 100644 --- a/test/T42.stl.names.map.hpp +++ b/test/T42.stl.names.map.hpp @@ -11,7 +11,7 @@ /// @author Sergey Lyskov /// The multimap/multiset classes are tested in the binder/test/T43.stl.names.multi.hpp to avoid -/// problems with different ordering of multiset/set and multimap/map bindings +/// problems with different ordering of multiset/set and multimap/map bindings /// in the generated files on different platforms. #ifndef _INCLUDED_T42_stl_names_map_hpp_ #define _INCLUDED_T42_stl_names_map_hpp_ @@ -20,9 +20,18 @@ #include #include +#include +#include +#include +#include +#include +#include + void foo(std::map ) {} void foo(std::unordered_map ) {} +void foo(std::map > > > >) {} +void foo(std::unordered_map > > > >) {} #endif // _INCLUDED_T42_stl_names_map_hpp_ diff --git a/test/T42.stl.names.map.ref b/test/T42.stl.names.map.ref index 551d9550..2cbd2a64 100644 --- a/test/T42.stl.names.map.ref +++ b/test/T42.stl.names.map.ref @@ -7,7 +7,11 @@ #include // std::binary_function #include // std::equal_to #include // std::less +#include // __gnu_cxx::__normal_iterator +#include // std::allocator #include // __str__ +#include // std::basic_string +#include // std::char_traits #include #include @@ -28,22 +32,36 @@ void bind_std_stl_function(std::function< pybind11::module &(std::string const & cl.def( pybind11::init( [](){ return new std::binary_function(); } ) ); cl.def("assign", (struct std::binary_function & (std::binary_function::*)(const struct std::binary_function &)) &std::binary_function::operator=, "C++: std::binary_function::operator=(const struct std::binary_function &) --> struct std::binary_function &", pybind11::return_value_policy::automatic, pybind11::arg("")); } + { // std::binary_function file:bits/stl_function.h line:114 + pybind11::class_, std::shared_ptr>> cl(M("std"), "binary_function_std_string_std_string_bool_t", ""); + cl.def( pybind11::init( [](std::binary_function const &o){ return new std::binary_function(o); } ) ); + cl.def( pybind11::init( [](){ return new std::binary_function(); } ) ); + cl.def("assign", (struct std::binary_function & (std::binary_function::*)(const struct std::binary_function &)) &std::binary_function::operator=, "C++: std::binary_function::operator=(const struct std::binary_function &) --> struct std::binary_function &", pybind11::return_value_policy::automatic, pybind11::arg("")); + } { // std::equal_to file:bits/stl_function.h line:204 pybind11::class_, std::shared_ptr>, std::binary_function> cl(M("std"), "equal_to_float_t", ""); cl.def( pybind11::init( [](){ return new std::equal_to(); } ) ); cl.def("__call__", (bool (std::equal_to::*)(const float &, const float &) const) &std::equal_to::operator(), "C++: std::equal_to::operator()(const float &, const float &) const --> bool", pybind11::arg("__x"), pybind11::arg("__y")); cl.def("assign", (struct std::binary_function & (std::binary_function::*)(const struct std::binary_function &)) &std::binary_function::operator=, "C++: std::binary_function::operator=(const struct std::binary_function &) --> struct std::binary_function &", pybind11::return_value_policy::automatic, pybind11::arg("")); } + { // std::equal_to file:bits/stl_function.h line:204 + pybind11::class_, std::shared_ptr>, std::binary_function> cl(M("std"), "equal_to_std_string_t", ""); + cl.def( pybind11::init( [](){ return new std::equal_to(); } ) ); + cl.def("__call__", (bool (std::equal_to::*)(const std::string &, const std::string &) const) &std::equal_to::operator(), "C++: std::equal_to::operator()(const std::string &, const std::string &) const --> bool", pybind11::arg("__x"), pybind11::arg("__y")); + cl.def("assign", (struct std::binary_function & (std::binary_function::*)(const struct std::binary_function &)) &std::binary_function::operator=, "C++: std::binary_function::operator=(const struct std::binary_function &) --> struct std::binary_function &", pybind11::return_value_policy::automatic, pybind11::arg("")); + } } // File: std/functional_hash.cpp +#include // std::deque +#include // std::forward_list #include // std::_Manager_operation #include // std::bad_function_call -#include // std::equal_to #include // std::hash #include // std::less #include // __gnu_cxx::__normal_iterator +#include // std::list #include // std::_Rb_tree_color #include // std::_Rb_tree_const_iterator #include // std::_Rb_tree_iterator @@ -64,10 +82,8 @@ void bind_std_stl_function(std::function< pybind11::module &(std::string const & #include // std::char_traits #include // std::hash #include // std::tuple -#include // std::__detail::_Node_const_iterator -#include // std::__detail::_Node_iterator -#include // std::unordered_map #include // std::pair +#include // std::vector #include #include @@ -89,6 +105,11 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons cl.def("__call__", (unsigned long (std::hash::*)(float) const) &std::hash::operator(), "C++: std::hash::operator()(float) const --> unsigned long", pybind11::arg("__val")); cl.def("assign", (struct std::hash & (std::hash::*)(const struct std::hash &)) &std::hash::operator=, "C++: std::hash::operator=(const struct std::hash &) --> struct std::hash &", pybind11::return_value_policy::automatic, pybind11::arg("")); } + { // std::hash file:bits/basic_string.h line:3044 + pybind11::class_, std::shared_ptr>> cl(M("std"), "hash_std_string_t", ""); + cl.def( pybind11::init( [](){ return new std::hash(); } ) ); + cl.def("__call__", (unsigned long (std::hash::*)(const std::string &) const) &std::hash::operator(), "C++: std::hash::operator()(const std::string &) const --> unsigned long", pybind11::arg("__s")); + } { // std::map file:bits/stl_map.h line:96 pybind11::class_, std::shared_ptr>> cl(M("std"), "map_float_int_t", ""); cl.def( pybind11::init( [](){ return new std::map(); } ) ); @@ -111,6 +132,62 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons cl.def("count", (unsigned long (std::map::*)(const float &) const) &std::map, std::allocator > >::count, "C++: std::map, std::allocator > >::count(const float &) const --> unsigned long", pybind11::arg("__x")); cl.def("equal_range", (struct std::pair >, struct std::_Rb_tree_iterator > > (std::map::*)(const float &)) &std::map, std::allocator > >::equal_range, "C++: std::map, std::allocator > >::equal_range(const float &) --> struct std::pair >, struct std::_Rb_tree_iterator > >", pybind11::arg("__x")); } + { // std::map file:bits/stl_map.h line:96 + pybind11::class_>>>>, std::shared_ptr>>>>>> cl(M("std"), "map_std_string_std_list_std_forward_list_std_deque_std_vector_double_t", ""); + cl.def( pybind11::init( [](){ return new std::map>>>>(); } ) ); + cl.def( pybind11::init( [](const struct std::less & a0){ return new std::map>>>>(a0); } ), "doc" , pybind11::arg("__comp")); + cl.def( pybind11::init &, const class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &>(), pybind11::arg("__comp"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::map>>>> const &o){ return new std::map>>>>(o); } ) ); + cl.def("assign", (class std::map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > & (std::map>>>>::*)(const class std::map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::map>>>, std::less, std::allocator>>> > > >::operator=, "C++: std::map>>>, std::less, std::allocator>>> > > >::operator=(const class std::map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> class std::map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("get_allocator", (class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > (std::map>>>>::*)() const) &std::map>>>, std::less, std::allocator>>> > > >::get_allocator, "C++: std::map>>>, std::less, std::allocator>>> > > >::get_allocator() const --> class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >"); + cl.def("empty", (bool (std::map>>>>::*)() const) &std::map>>>, std::less, std::allocator>>> > > >::empty, "C++: std::map>>>, std::less, std::allocator>>> > > >::empty() const --> bool"); + cl.def("size", (unsigned long (std::map>>>>::*)() const) &std::map>>>, std::less, std::allocator>>> > > >::size, "C++: std::map>>>, std::less, std::allocator>>> > > >::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::map>>>>::*)() const) &std::map>>>, std::less, std::allocator>>> > > >::max_size, "C++: std::map>>>, std::less, std::allocator>>> > > >::max_size() const --> unsigned long"); + cl.def("__getitem__", (class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > & (std::map>>>>::*)(const std::string &)) &std::map>>>, std::less, std::allocator>>> > > >::operator[], "C++: std::map>>>, std::less, std::allocator>>> > > >::operator[](const std::string &) --> class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__k")); + cl.def("at", (class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > & (std::map>>>>::*)(const std::string &)) &std::map>>>, std::less, std::allocator>>> > > >::at, "C++: std::map>>>, std::less, std::allocator>>> > > >::at(const std::string &) --> class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__k")); + cl.def("insert", (struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >, bool> (std::map>>>>::*)(const struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > &)) &std::map>>>, std::less, std::allocator>>> > > >::insert, "C++: std::map>>>, std::less, std::allocator>>> > > >::insert(const struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > &) --> struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >, bool>", pybind11::arg("__x")); + cl.def("erase", (unsigned long (std::map>>>>::*)(const std::string &)) &std::map>>>, std::less, std::allocator>>> > > >::erase, "C++: std::map>>>, std::less, std::allocator>>> > > >::erase(const std::string &) --> unsigned long", pybind11::arg("__x")); + cl.def("swap", (void (std::map>>>>::*)(class std::map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::map>>>, std::less, std::allocator>>> > > >::swap, "C++: std::map>>>, std::less, std::allocator>>> > > >::swap(class std::map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::map>>>>::*)()) &std::map>>>, std::less, std::allocator>>> > > >::clear, "C++: std::map>>>, std::less, std::allocator>>> > > >::clear() --> void"); + cl.def("key_comp", (struct std::less (std::map>>>>::*)() const) &std::map>>>, std::less, std::allocator>>> > > >::key_comp, "C++: std::map>>>, std::less, std::allocator>>> > > >::key_comp() const --> struct std::less"); + cl.def("count", (unsigned long (std::map>>>>::*)(const std::string &) const) &std::map>>>, std::less, std::allocator>>> > > >::count, "C++: std::map>>>, std::less, std::allocator>>> > > >::count(const std::string &) const --> unsigned long", pybind11::arg("__x")); + cl.def("equal_range", (struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >, struct std::_Rb_tree_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > (std::map>>>>::*)(const std::string &)) &std::map>>>, std::less, std::allocator>>> > > >::equal_range, "C++: std::map>>>, std::less, std::allocator>>> > > >::equal_range(const std::string &) --> struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >, struct std::_Rb_tree_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >", pybind11::arg("__x")); + } +} + + +// File: std/unordered_map.cpp +#include // std::deque +#include // std::forward_list +#include // std::equal_to +#include // std::hash +#include // __gnu_cxx::__normal_iterator +#include // std::list +#include // std::allocator +#include // __str__ +#include // std::basic_string +#include // std::char_traits +#include // std::hash +#include // std::__detail::_Node_const_iterator +#include // std::__detail::_Node_iterator +#include // std::unordered_map +#include // std::pair +#include // std::vector + +#include +#include +#include + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +void bind_std_unordered_map(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ { // std::unordered_map file:bits/unordered_map.h line:97 pybind11::class_, std::shared_ptr>> cl(M("std"), "unordered_map_float_int_t", ""); cl.def( pybind11::init( [](){ return new std::unordered_map(); } ), "doc" ); @@ -145,22 +222,113 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons cl.def("rehash", (void (std::unordered_map::*)(unsigned long)) &std::unordered_map, std::equal_to, std::allocator > >::rehash, "C++: std::unordered_map, std::equal_to, std::allocator > >::rehash(unsigned long) --> void", pybind11::arg("__n")); cl.def("reserve", (void (std::unordered_map::*)(unsigned long)) &std::unordered_map, std::equal_to, std::allocator > >::reserve, "C++: std::unordered_map, std::equal_to, std::allocator > >::reserve(unsigned long) --> void", pybind11::arg("__n")); } + { // std::unordered_map file:bits/unordered_map.h line:97 + pybind11::class_>>>,std::hash,std::equal_to,std::allocator>>> > >>, std::shared_ptr>>>,std::hash,std::equal_to,std::allocator>>> > >>>> cl(M("std"), "unordered_map_std_string_std_list_std_forward_list_std_deque_std_vector_double_std_hash_std_string_std_equal_to_std_string_std_allocator_std_pair_const_std_string_std_list_std_forward_list_std_deque_std_vector_double_t", ""); + cl.def( pybind11::init( [](){ return new std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>(); } ), "doc" ); + cl.def( pybind11::init( [](unsigned long const & a0){ return new std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>(a0); } ), "doc" , pybind11::arg("__n")); + cl.def( pybind11::init( [](unsigned long const & a0, const struct std::hash & a1){ return new std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>(a0, a1); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__hf")); + cl.def( pybind11::init( [](unsigned long const & a0, const struct std::hash & a1, const struct std::equal_to & a2){ return new std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>(a0, a1, a2); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql")); + cl.def( pybind11::init &, const struct std::equal_to &, const class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &>(), pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >> const &o){ return new std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>(o); } ) ); + cl.def("assign", (class std::unordered_map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > & (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(const class std::unordered_map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::operator=, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::operator=(const class std::unordered_map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> class std::unordered_map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("get_allocator", (class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)() const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::get_allocator, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::get_allocator() const --> class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >"); + cl.def("empty", (bool (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)() const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::empty, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::empty() const --> bool"); + cl.def("size", (unsigned long (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)() const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::size, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)() const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_size, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_size() const --> unsigned long"); + cl.def("insert", (struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, true>, bool> (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(const struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > &)) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::insert, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::insert(const struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > &) --> struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, true>, bool>", pybind11::arg("__x")); + cl.def("erase", (unsigned long (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(const std::string &)) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::erase, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::erase(const std::string &) --> unsigned long", pybind11::arg("__x")); + cl.def("clear", (void (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)()) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::clear, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::clear() --> void"); + cl.def("swap", (void (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(class std::unordered_map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::swap, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::swap(class std::unordered_map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> void", pybind11::arg("__x")); + cl.def("hash_function", (struct std::hash (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)() const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::hash_function, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::hash_function() const --> struct std::hash"); + cl.def("key_eq", (struct std::equal_to (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)() const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::key_eq, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::key_eq() const --> struct std::equal_to"); + cl.def("count", (unsigned long (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(const std::string &) const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::count, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::count(const std::string &) const --> unsigned long", pybind11::arg("__x")); + cl.def("equal_range", (struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, true>, struct std::__detail::_Node_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, true> > (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(const std::string &)) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::equal_range, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::equal_range(const std::string &) --> struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, true>, struct std::__detail::_Node_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, true> >", pybind11::arg("__x")); + cl.def("__getitem__", (class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > & (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(const std::string &)) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::operator[], "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::operator[](const std::string &) --> class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__k")); + cl.def("at", (class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > & (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(const std::string &)) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::at, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::at(const std::string &) --> class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__k")); + cl.def("bucket_count", (unsigned long (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)() const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_count, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_count() const --> unsigned long"); + cl.def("max_bucket_count", (unsigned long (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)() const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_bucket_count, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_bucket_count() const --> unsigned long"); + cl.def("bucket_size", (unsigned long (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(unsigned long) const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_size, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_size(unsigned long) const --> unsigned long", pybind11::arg("__n")); + cl.def("bucket", (unsigned long (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(const std::string &) const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket(const std::string &) const --> unsigned long", pybind11::arg("__key")); + cl.def("load_factor", (float (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)() const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::load_factor, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::load_factor() const --> float"); + cl.def("max_load_factor", (float (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)() const) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor() const --> float"); + cl.def("max_load_factor", (void (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(float)) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor(float) --> void", pybind11::arg("__z")); + cl.def("rehash", (void (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(unsigned long)) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::rehash, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::rehash(unsigned long) --> void", pybind11::arg("__n")); + cl.def("reserve", (void (std::unordered_map>>>,std::hash,std::equal_to,std::allocator>>> > >>::*)(unsigned long)) &std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::reserve, "C++: std::unordered_map>>>, std::hash, std::equal_to, std::allocator>>> > > >::reserve(unsigned long) --> void", pybind11::arg("__n")); + } +} + + +// File: std/stl_list.cpp +#include // std::deque +#include // std::forward_list +#include // std::list +#include // std::allocator +#include // __str__ +#include // std::vector + +#include +#include +#include + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +void bind_std_stl_list(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ + { // std::list file:bits/stl_list.h line:438 + pybind11::class_>>>, std::shared_ptr>>>>> cl(M("std"), "list_std_forward_list_std_deque_std_vector_double_t", ""); + cl.def( pybind11::init( [](){ return new std::list>>>(); } ) ); + cl.def( pybind11::init >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > &>(), pybind11::arg("__a") ); + + cl.def( pybind11::init(), pybind11::arg("__n") ); + + cl.def( pybind11::init( [](std::list>>> const &o){ return new std::list>>>(o); } ) ); + cl.def("assign", (class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > & (std::list>>>::*)(const class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &)) &std::list>>>::operator=, "C++: std::list>>>::operator=(const class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &) --> class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("get_allocator", (class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > (std::list>>>::*)() const) &std::list>>>::get_allocator, "C++: std::list>>>::get_allocator() const --> class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >"); + cl.def("empty", (bool (std::list>>>::*)() const) &std::list>>>::empty, "C++: std::list>>>::empty() const --> bool"); + cl.def("size", (unsigned long (std::list>>>::*)() const) &std::list>>>::size, "C++: std::list>>>::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::list>>>::*)() const) &std::list>>>::max_size, "C++: std::list>>>::max_size() const --> unsigned long"); + cl.def("resize", (void (std::list>>>::*)(unsigned long)) &std::list>>>::resize, "C++: std::list>>>::resize(unsigned long) --> void", pybind11::arg("__new_size")); + cl.def("front", (class std::forward_list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > & (std::list>>>::*)()) &std::list>>>::front, "C++: std::list>>>::front() --> class std::forward_list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &", pybind11::return_value_policy::automatic); + cl.def("back", (class std::forward_list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > & (std::list>>>::*)()) &std::list>>>::back, "C++: std::list>>>::back() --> class std::forward_list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &", pybind11::return_value_policy::automatic); + cl.def("pop_front", (void (std::list>>>::*)()) &std::list>>>::pop_front, "C++: std::list>>>::pop_front() --> void"); + cl.def("pop_back", (void (std::list>>>::*)()) &std::list>>>::pop_back, "C++: std::list>>>::pop_back() --> void"); + cl.def("swap", (void (std::list>>>::*)(class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &)) &std::list>>>::swap, "C++: std::list>>>::swap(class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::list>>>::*)()) &std::list>>>::clear, "C++: std::list>>>::clear() --> void"); + cl.def("unique", (void (std::list>>>::*)()) &std::list>>>::unique, "C++: std::list>>>::unique() --> void"); + cl.def("merge", (void (std::list>>>::*)(class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &)) &std::list>>>::merge, "C++: std::list>>>::merge(class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &) --> void", pybind11::arg("__x")); + cl.def("reverse", (void (std::list>>>::*)()) &std::list>>>::reverse, "C++: std::list>>>::reverse() --> void"); + cl.def("sort", (void (std::list>>>::*)()) &std::list>>>::sort, "C++: std::list>>>::sort() --> void"); + } } // File: T42_stl_names_map.cpp #include // foo +#include // std::deque +#include // std::forward_list #include // std::equal_to #include // std::hash #include // std::less +#include // __gnu_cxx::__normal_iterator +#include // std::list #include // std::_Rb_tree_const_iterator #include // std::_Rb_tree_iterator #include // std::map #include // std::allocator +#include // std::basic_string +#include // std::char_traits +#include // std::hash #include // std::__detail::_Node_const_iterator #include // std::__detail::_Node_iterator #include // std::unordered_map #include // std::pair +#include // std::vector #include #include @@ -175,12 +343,18 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons void bind_T42_stl_names_map(std::function< pybind11::module &(std::string const &namespace_) > &M) { - // foo(class std::map, class std::allocator > >) file:T42.stl.names.map.hpp line:23 + // foo(class std::map, class std::allocator > >) file:T42.stl.names.map.hpp line:29 M("").def("foo", (void (*)(class std::map, class std::allocator > >)) &foo, "C++: foo(class std::map, class std::allocator > >) --> void", pybind11::arg("")); - // foo(class std::unordered_map, struct std::equal_to, class std::allocator > >) file:T42.stl.names.map.hpp line:25 + // foo(class std::unordered_map, struct std::equal_to, class std::allocator > >) file:T42.stl.names.map.hpp line:31 M("").def("foo", (void (*)(class std::unordered_map, struct std::equal_to, class std::allocator > >)) &foo, "C++: foo(class std::unordered_map, struct std::equal_to, class std::allocator > >) --> void", pybind11::arg("")); + // foo(class std::map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) file:T42.stl.names.map.hpp line:33 + M("").def("foo", (void (*)(class std::map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >)) &foo, "C++: foo(class std::map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) --> void", pybind11::arg("")); + + // foo(class std::unordered_map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) file:T42.stl.names.map.hpp line:34 + M("").def("foo", (void (*)(class std::unordered_map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >)) &foo, "C++: foo(class std::unordered_map >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) --> void", pybind11::arg("")); + } @@ -196,6 +370,8 @@ typedef std::function< pybind11::module & (std::string const &) > ModuleGetter; void bind_std_stl_function(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_std_functional_hash(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_std_unordered_map(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_std_stl_list(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_T42_stl_names_map(std::function< pybind11::module &(std::string const &namespace_) > &M); @@ -220,6 +396,8 @@ PYBIND11_MODULE(T42_stl_names_map, root_module) { bind_std_stl_function(M); bind_std_functional_hash(M); + bind_std_unordered_map(M); + bind_std_stl_list(M); bind_T42_stl_names_map(M); } @@ -228,6 +406,8 @@ PYBIND11_MODULE(T42_stl_names_map, root_module) { // T42_stl_names_map.cpp // std/stl_function.cpp // std/functional_hash.cpp +// std/unordered_map.cpp +// std/stl_list.cpp // T42_stl_names_map.cpp // Modules list file: TEST/T42_stl_names_map.modules diff --git a/test/T42.stl.names.multi.hpp b/test/T42.stl.names.multi.hpp index 49e9dd1a..3ae70ba9 100644 --- a/test/T42.stl.names.multi.hpp +++ b/test/T42.stl.names.multi.hpp @@ -11,7 +11,7 @@ /// @author Sergey Lyskov/Andrii Verbytskyi /// This test is separated from the binder/test/T42.stl.names.hpp to avoid -/// problems with different ordering of multiset/set and multimap/map bindings +/// problems with different ordering of multiset/set and multimap/map bindings /// in the generated files on different platforms. #ifndef _INCLUDED_T42_stl_names_multi_hpp_ #define _INCLUDED_T42_stl_names_multi_hpp_ @@ -23,6 +23,10 @@ #include #include +#include +#include +#include +#include void foo(std::multimap ) {} void foo(std::multiset ) {} @@ -30,4 +34,7 @@ void foo(std::multiset ) {} void foo(std::unordered_multiset ) {} void foo(std::unordered_multimap ) {} +void foo(std::multimap > > > >) {} +void foo(std::unordered_multimap > > > >) {} + #endif // _INCLUDED_T42_stl_names_multi_hpp_ diff --git a/test/T42.stl.names.multi.ref b/test/T42.stl.names.multi.ref index 68a25f88..bb3da507 100644 --- a/test/T42.stl.names.multi.ref +++ b/test/T42.stl.names.multi.ref @@ -7,7 +7,11 @@ #include // std::binary_function #include // std::equal_to #include // std::less +#include // __gnu_cxx::__normal_iterator +#include // std::allocator #include // __str__ +#include // std::basic_string +#include // std::char_traits #include #include @@ -28,21 +32,36 @@ void bind_std_stl_function(std::function< pybind11::module &(std::string const & cl.def( pybind11::init( [](){ return new std::binary_function(); } ) ); cl.def("assign", (struct std::binary_function & (std::binary_function::*)(const struct std::binary_function &)) &std::binary_function::operator=, "C++: std::binary_function::operator=(const struct std::binary_function &) --> struct std::binary_function &", pybind11::return_value_policy::automatic, pybind11::arg("")); } + { // std::binary_function file:bits/stl_function.h line:114 + pybind11::class_, std::shared_ptr>> cl(M("std"), "binary_function_std_string_std_string_bool_t", ""); + cl.def( pybind11::init( [](std::binary_function const &o){ return new std::binary_function(o); } ) ); + cl.def( pybind11::init( [](){ return new std::binary_function(); } ) ); + cl.def("assign", (struct std::binary_function & (std::binary_function::*)(const struct std::binary_function &)) &std::binary_function::operator=, "C++: std::binary_function::operator=(const struct std::binary_function &) --> struct std::binary_function &", pybind11::return_value_policy::automatic, pybind11::arg("")); + } { // std::equal_to file:bits/stl_function.h line:204 pybind11::class_, std::shared_ptr>, std::binary_function> cl(M("std"), "equal_to_float_t", ""); cl.def( pybind11::init( [](){ return new std::equal_to(); } ) ); cl.def("__call__", (bool (std::equal_to::*)(const float &, const float &) const) &std::equal_to::operator(), "C++: std::equal_to::operator()(const float &, const float &) const --> bool", pybind11::arg("__x"), pybind11::arg("__y")); cl.def("assign", (struct std::binary_function & (std::binary_function::*)(const struct std::binary_function &)) &std::binary_function::operator=, "C++: std::binary_function::operator=(const struct std::binary_function &) --> struct std::binary_function &", pybind11::return_value_policy::automatic, pybind11::arg("")); } + { // std::equal_to file:bits/stl_function.h line:204 + pybind11::class_, std::shared_ptr>, std::binary_function> cl(M("std"), "equal_to_std_string_t", ""); + cl.def( pybind11::init( [](){ return new std::equal_to(); } ) ); + cl.def("__call__", (bool (std::equal_to::*)(const std::string &, const std::string &) const) &std::equal_to::operator(), "C++: std::equal_to::operator()(const std::string &, const std::string &) const --> bool", pybind11::arg("__x"), pybind11::arg("__y")); + cl.def("assign", (struct std::binary_function & (std::binary_function::*)(const struct std::binary_function &)) &std::binary_function::operator=, "C++: std::binary_function::operator=(const struct std::binary_function &) --> struct std::binary_function &", pybind11::return_value_policy::automatic, pybind11::arg("")); + } } // File: std/functional_hash.cpp +#include // std::deque +#include // std::forward_list #include // std::_Manager_operation #include // std::bad_function_call #include // std::hash #include // std::less #include // __gnu_cxx::__normal_iterator +#include // std::list #include // std::_Rb_tree_color #include // std::_Rb_tree_const_iterator #include // std::_Rb_tree_iterator @@ -65,6 +84,7 @@ void bind_std_stl_function(std::function< pybind11::module &(std::string const & #include // std::hash #include // std::tuple #include // std::pair +#include // std::vector #include #include @@ -86,6 +106,11 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons cl.def("__call__", (unsigned long (std::hash::*)(float) const) &std::hash::operator(), "C++: std::hash::operator()(float) const --> unsigned long", pybind11::arg("__val")); cl.def("assign", (struct std::hash & (std::hash::*)(const struct std::hash &)) &std::hash::operator=, "C++: std::hash::operator=(const struct std::hash &) --> struct std::hash &", pybind11::return_value_policy::automatic, pybind11::arg("")); } + { // std::hash file:bits/basic_string.h line:3044 + pybind11::class_, std::shared_ptr>> cl(M("std"), "hash_std_string_t", ""); + cl.def( pybind11::init( [](){ return new std::hash(); } ) ); + cl.def("__call__", (unsigned long (std::hash::*)(const std::string &) const) &std::hash::operator(), "C++: std::hash::operator()(const std::string &) const --> unsigned long", pybind11::arg("__s")); + } { // std::multiset file:bits/stl_multiset.h line:92 pybind11::class_, std::shared_ptr>> cl(M("std"), "multiset_float_t", ""); cl.def( pybind11::init( [](){ return new std::multiset(); } ) ); @@ -125,6 +150,25 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons cl.def("count", (unsigned long (std::multimap::*)(const float &) const) &std::multimap, std::allocator > >::count, "C++: std::multimap, std::allocator > >::count(const float &) const --> unsigned long", pybind11::arg("__x")); cl.def("equal_range", (struct std::pair >, struct std::_Rb_tree_iterator > > (std::multimap::*)(const float &)) &std::multimap, std::allocator > >::equal_range, "C++: std::multimap, std::allocator > >::equal_range(const float &) --> struct std::pair >, struct std::_Rb_tree_iterator > >", pybind11::arg("__x")); } + { // std::multimap file:bits/stl_multimap.h line:95 + pybind11::class_>>>>, std::shared_ptr>>>>>> cl(M("std"), "multimap_std_string_std_list_std_forward_list_std_deque_std_vector_double_t", ""); + cl.def( pybind11::init( [](){ return new std::multimap>>>>(); } ) ); + cl.def( pybind11::init( [](const struct std::less & a0){ return new std::multimap>>>>(a0); } ), "doc" , pybind11::arg("__comp")); + cl.def( pybind11::init &, const class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &>(), pybind11::arg("__comp"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::multimap>>>> const &o){ return new std::multimap>>>>(o); } ) ); + cl.def("assign", (class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > & (std::multimap>>>>::*)(const class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::multimap>>>, std::less, std::allocator>>> > > >::operator=, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::operator=(const class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("get_allocator", (class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > (std::multimap>>>>::*)() const) &std::multimap>>>, std::less, std::allocator>>> > > >::get_allocator, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::get_allocator() const --> class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >"); + cl.def("empty", (bool (std::multimap>>>>::*)() const) &std::multimap>>>, std::less, std::allocator>>> > > >::empty, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::empty() const --> bool"); + cl.def("size", (unsigned long (std::multimap>>>>::*)() const) &std::multimap>>>, std::less, std::allocator>>> > > >::size, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::multimap>>>>::*)() const) &std::multimap>>>, std::less, std::allocator>>> > > >::max_size, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::max_size() const --> unsigned long"); + cl.def("erase", (unsigned long (std::multimap>>>>::*)(const std::string &)) &std::multimap>>>, std::less, std::allocator>>> > > >::erase, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::erase(const std::string &) --> unsigned long", pybind11::arg("__x")); + cl.def("swap", (void (std::multimap>>>>::*)(class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::multimap>>>, std::less, std::allocator>>> > > >::swap, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::swap(class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::multimap>>>>::*)()) &std::multimap>>>, std::less, std::allocator>>> > > >::clear, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::clear() --> void"); + cl.def("key_comp", (struct std::less (std::multimap>>>>::*)() const) &std::multimap>>>, std::less, std::allocator>>> > > >::key_comp, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::key_comp() const --> struct std::less"); + cl.def("count", (unsigned long (std::multimap>>>>::*)(const std::string &) const) &std::multimap>>>, std::less, std::allocator>>> > > >::count, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::count(const std::string &) const --> unsigned long", pybind11::arg("__x")); + cl.def("equal_range", (struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >, struct std::_Rb_tree_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > (std::multimap>>>>::*)(const std::string &)) &std::multimap>>>, std::less, std::allocator>>> > > >::equal_range, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::equal_range(const std::string &) --> struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >, struct std::_Rb_tree_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >", pybind11::arg("__x")); + } } @@ -161,27 +205,27 @@ void bind_std_unordered_set(std::function< pybind11::module &(std::string const cl.def( pybind11::init &, const struct std::equal_to &, const class std::allocator &>(), pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql"), pybind11::arg("__a") ); cl.def( pybind11::init( [](std::unordered_multiset const &o){ return new std::unordered_multiset(o); } ) ); - cl.def("assign", (class std::unordered_multiset, struct std::equal_to, class std::allocator > & (std::unordered_multiset::*)(const class std::unordered_multiset, struct std::equal_to, class std::allocator > &)) &std::unordered_multiset, std::equal_to, std::allocator >::operator=, "C++: std::unordered_multiset, std::equal_to, std::allocator >::operator=(const class std::unordered_multiset, struct std::equal_to, class std::allocator > &) --> class std::unordered_multiset, struct std::equal_to, class std::allocator > &", pybind11::return_value_policy::automatic, pybind11::arg("")); - cl.def("get_allocator", (class std::allocator (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::get_allocator, "C++: std::unordered_multiset, std::equal_to, std::allocator >::get_allocator() const --> class std::allocator"); - cl.def("empty", (bool (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::empty, "C++: std::unordered_multiset, std::equal_to, std::allocator >::empty() const --> bool"); - cl.def("size", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::size, "C++: std::unordered_multiset, std::equal_to, std::allocator >::size() const --> unsigned long"); - cl.def("max_size", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::max_size, "C++: std::unordered_multiset, std::equal_to, std::allocator >::max_size() const --> unsigned long"); - cl.def("erase", (unsigned long (std::unordered_multiset::*)(const float &)) &std::unordered_multiset, std::equal_to, std::allocator >::erase, "C++: std::unordered_multiset, std::equal_to, std::allocator >::erase(const float &) --> unsigned long", pybind11::arg("__x")); - cl.def("clear", (void (std::unordered_multiset::*)()) &std::unordered_multiset, std::equal_to, std::allocator >::clear, "C++: std::unordered_multiset, std::equal_to, std::allocator >::clear() --> void"); - cl.def("swap", (void (std::unordered_multiset::*)(class std::unordered_multiset, struct std::equal_to, class std::allocator > &)) &std::unordered_multiset, std::equal_to, std::allocator >::swap, "C++: std::unordered_multiset, std::equal_to, std::allocator >::swap(class std::unordered_multiset, struct std::equal_to, class std::allocator > &) --> void", pybind11::arg("__x")); - cl.def("hash_function", (struct std::hash (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::hash_function, "C++: std::unordered_multiset, std::equal_to, std::allocator >::hash_function() const --> struct std::hash"); - cl.def("key_eq", (struct std::equal_to (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::key_eq, "C++: std::unordered_multiset, std::equal_to, std::allocator >::key_eq() const --> struct std::equal_to"); - cl.def("count", (unsigned long (std::unordered_multiset::*)(const float &) const) &std::unordered_multiset, std::equal_to, std::allocator >::count, "C++: std::unordered_multiset, std::equal_to, std::allocator >::count(const float &) const --> unsigned long", pybind11::arg("__x")); - cl.def("equal_range", (struct std::pair, struct std::__detail::_Node_iterator > (std::unordered_multiset::*)(const float &)) &std::unordered_multiset, std::equal_to, std::allocator >::equal_range, "C++: std::unordered_multiset, std::equal_to, std::allocator >::equal_range(const float &) --> struct std::pair, struct std::__detail::_Node_iterator >", pybind11::arg("__x")); - cl.def("bucket_count", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::bucket_count, "C++: std::unordered_multiset, std::equal_to, std::allocator >::bucket_count() const --> unsigned long"); - cl.def("max_bucket_count", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::max_bucket_count, "C++: std::unordered_multiset, std::equal_to, std::allocator >::max_bucket_count() const --> unsigned long"); - cl.def("bucket_size", (unsigned long (std::unordered_multiset::*)(unsigned long) const) &std::unordered_multiset, std::equal_to, std::allocator >::bucket_size, "C++: std::unordered_multiset, std::equal_to, std::allocator >::bucket_size(unsigned long) const --> unsigned long", pybind11::arg("__n")); - cl.def("bucket", (unsigned long (std::unordered_multiset::*)(const float &) const) &std::unordered_multiset, std::equal_to, std::allocator >::bucket, "C++: std::unordered_multiset, std::equal_to, std::allocator >::bucket(const float &) const --> unsigned long", pybind11::arg("__key")); - cl.def("load_factor", (float (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::load_factor, "C++: std::unordered_multiset, std::equal_to, std::allocator >::load_factor() const --> float"); - cl.def("max_load_factor", (float (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::max_load_factor, "C++: std::unordered_multiset, std::equal_to, std::allocator >::max_load_factor() const --> float"); - cl.def("max_load_factor", (void (std::unordered_multiset::*)(float)) &std::unordered_multiset, std::equal_to, std::allocator >::max_load_factor, "C++: std::unordered_multiset, std::equal_to, std::allocator >::max_load_factor(float) --> void", pybind11::arg("__z")); - cl.def("rehash", (void (std::unordered_multiset::*)(unsigned long)) &std::unordered_multiset, std::equal_to, std::allocator >::rehash, "C++: std::unordered_multiset, std::equal_to, std::allocator >::rehash(unsigned long) --> void", pybind11::arg("__n")); - cl.def("reserve", (void (std::unordered_multiset::*)(unsigned long)) &std::unordered_multiset, std::equal_to, std::allocator >::reserve, "C++: std::unordered_multiset, std::equal_to, std::allocator >::reserve(unsigned long) --> void", pybind11::arg("__n")); + cl.def("assign", (class std::unordered_multiset, struct std::equal_to, class std::allocator > & (std::unordered_multiset::*)(const class std::unordered_multiset, struct std::equal_to, class std::allocator > &)) &std::unordered_multiset::operator=, "C++: std::unordered_multiset::operator=(const class std::unordered_multiset, struct std::equal_to, class std::allocator > &) --> class std::unordered_multiset, struct std::equal_to, class std::allocator > &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("get_allocator", (class std::allocator (std::unordered_multiset::*)() const) &std::unordered_multiset::get_allocator, "C++: std::unordered_multiset::get_allocator() const --> class std::allocator"); + cl.def("empty", (bool (std::unordered_multiset::*)() const) &std::unordered_multiset::empty, "C++: std::unordered_multiset::empty() const --> bool"); + cl.def("size", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset::size, "C++: std::unordered_multiset::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset::max_size, "C++: std::unordered_multiset::max_size() const --> unsigned long"); + cl.def("erase", (unsigned long (std::unordered_multiset::*)(const float &)) &std::unordered_multiset::erase, "C++: std::unordered_multiset::erase(const float &) --> unsigned long", pybind11::arg("__x")); + cl.def("clear", (void (std::unordered_multiset::*)()) &std::unordered_multiset::clear, "C++: std::unordered_multiset::clear() --> void"); + cl.def("swap", (void (std::unordered_multiset::*)(class std::unordered_multiset, struct std::equal_to, class std::allocator > &)) &std::unordered_multiset::swap, "C++: std::unordered_multiset::swap(class std::unordered_multiset, struct std::equal_to, class std::allocator > &) --> void", pybind11::arg("__x")); + cl.def("hash_function", (struct std::hash (std::unordered_multiset::*)() const) &std::unordered_multiset::hash_function, "C++: std::unordered_multiset::hash_function() const --> struct std::hash"); + cl.def("key_eq", (struct std::equal_to (std::unordered_multiset::*)() const) &std::unordered_multiset::key_eq, "C++: std::unordered_multiset::key_eq() const --> struct std::equal_to"); + cl.def("count", (unsigned long (std::unordered_multiset::*)(const float &) const) &std::unordered_multiset::count, "C++: std::unordered_multiset::count(const float &) const --> unsigned long", pybind11::arg("__x")); + cl.def("equal_range", (struct std::pair, struct std::__detail::_Node_iterator > (std::unordered_multiset::*)(const float &)) &std::unordered_multiset::equal_range, "C++: std::unordered_multiset::equal_range(const float &) --> struct std::pair, struct std::__detail::_Node_iterator >", pybind11::arg("__x")); + cl.def("bucket_count", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset::bucket_count, "C++: std::unordered_multiset::bucket_count() const --> unsigned long"); + cl.def("max_bucket_count", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset::max_bucket_count, "C++: std::unordered_multiset::max_bucket_count() const --> unsigned long"); + cl.def("bucket_size", (unsigned long (std::unordered_multiset::*)(unsigned long) const) &std::unordered_multiset::bucket_size, "C++: std::unordered_multiset::bucket_size(unsigned long) const --> unsigned long", pybind11::arg("__n")); + cl.def("bucket", (unsigned long (std::unordered_multiset::*)(const float &) const) &std::unordered_multiset::bucket, "C++: std::unordered_multiset::bucket(const float &) const --> unsigned long", pybind11::arg("__key")); + cl.def("load_factor", (float (std::unordered_multiset::*)() const) &std::unordered_multiset::load_factor, "C++: std::unordered_multiset::load_factor() const --> float"); + cl.def("max_load_factor", (float (std::unordered_multiset::*)() const) &std::unordered_multiset::max_load_factor, "C++: std::unordered_multiset::max_load_factor() const --> float"); + cl.def("max_load_factor", (void (std::unordered_multiset::*)(float)) &std::unordered_multiset::max_load_factor, "C++: std::unordered_multiset::max_load_factor(float) --> void", pybind11::arg("__z")); + cl.def("rehash", (void (std::unordered_multiset::*)(unsigned long)) &std::unordered_multiset::rehash, "C++: std::unordered_multiset::rehash(unsigned long) --> void", pybind11::arg("__n")); + cl.def("reserve", (void (std::unordered_multiset::*)(unsigned long)) &std::unordered_multiset::reserve, "C++: std::unordered_multiset::reserve(unsigned long) --> void", pybind11::arg("__n")); } { // std::unordered_multimap file:bits/unordered_map.h line:778 pybind11::class_, std::shared_ptr>> cl(M("std"), "unordered_multimap_float_int_t", ""); @@ -217,21 +261,93 @@ void bind_std_unordered_set(std::function< pybind11::module &(std::string const } +// File: std/unordered_map.cpp +#include // std::deque +#include // std::forward_list +#include // std::equal_to +#include // __gnu_cxx::__normal_iterator +#include // std::list +#include // std::allocator +#include // __str__ +#include // std::basic_string +#include // std::char_traits +#include // std::hash +#include // std::__detail::_Node_const_iterator +#include // std::__detail::_Node_iterator +#include // std::unordered_multimap +#include // std::pair +#include // std::vector + +#include +#include +#include + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +void bind_std_unordered_map(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ + { // std::unordered_multimap file:bits/unordered_map.h line:778 + pybind11::class_>>>>, std::shared_ptr>>>>>> cl(M("std"), "unordered_multimap_std_string_std_list_std_forward_list_std_deque_std_vector_double_t", ""); + cl.def( pybind11::init( [](){ return new std::unordered_multimap>>>>(); } ), "doc" ); + cl.def( pybind11::init( [](unsigned long const & a0){ return new std::unordered_multimap>>>>(a0); } ), "doc" , pybind11::arg("__n")); + cl.def( pybind11::init( [](unsigned long const & a0, const struct std::hash & a1){ return new std::unordered_multimap>>>>(a0, a1); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__hf")); + cl.def( pybind11::init( [](unsigned long const & a0, const struct std::hash & a1, const struct std::equal_to & a2){ return new std::unordered_multimap>>>>(a0, a1, a2); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql")); + cl.def( pybind11::init &, const struct std::equal_to &, const class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &>(), pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::unordered_multimap>>>> const &o){ return new std::unordered_multimap>>>>(o); } ) ); + cl.def("assign", (class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > & (std::unordered_multimap>>>>::*)(const class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::operator=, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::operator=(const class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("get_allocator", (class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::get_allocator, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::get_allocator() const --> class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >"); + cl.def("empty", (bool (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::empty, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::empty() const --> bool"); + cl.def("size", (unsigned long (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::size, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_size, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_size() const --> unsigned long"); + cl.def("erase", (unsigned long (std::unordered_multimap>>>>::*)(const std::string &)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::erase, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::erase(const std::string &) --> unsigned long", pybind11::arg("__x")); + cl.def("clear", (void (std::unordered_multimap>>>>::*)()) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::clear, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::clear() --> void"); + cl.def("swap", (void (std::unordered_multimap>>>>::*)(class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::swap, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::swap(class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> void", pybind11::arg("__x")); + cl.def("hash_function", (struct std::hash (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::hash_function, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::hash_function() const --> struct std::hash"); + cl.def("key_eq", (struct std::equal_to (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::key_eq, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::key_eq() const --> struct std::equal_to"); + cl.def("count", (unsigned long (std::unordered_multimap>>>>::*)(const std::string &) const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::count, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::count(const std::string &) const --> unsigned long", pybind11::arg("__x")); + cl.def("equal_range", (struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, true>, struct std::__detail::_Node_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, true> > (std::unordered_multimap>>>>::*)(const std::string &)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::equal_range, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::equal_range(const std::string &) --> struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, true>, struct std::__detail::_Node_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, true> >", pybind11::arg("__x")); + cl.def("bucket_count", (unsigned long (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_count, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_count() const --> unsigned long"); + cl.def("max_bucket_count", (unsigned long (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_bucket_count, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_bucket_count() const --> unsigned long"); + cl.def("bucket_size", (unsigned long (std::unordered_multimap>>>>::*)(unsigned long) const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_size, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_size(unsigned long) const --> unsigned long", pybind11::arg("__n")); + cl.def("bucket", (unsigned long (std::unordered_multimap>>>>::*)(const std::string &) const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket(const std::string &) const --> unsigned long", pybind11::arg("__key")); + cl.def("load_factor", (float (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::load_factor, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::load_factor() const --> float"); + cl.def("max_load_factor", (float (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor() const --> float"); + cl.def("max_load_factor", (void (std::unordered_multimap>>>>::*)(float)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor(float) --> void", pybind11::arg("__z")); + cl.def("rehash", (void (std::unordered_multimap>>>>::*)(unsigned long)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::rehash, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::rehash(unsigned long) --> void", pybind11::arg("__n")); + cl.def("reserve", (void (std::unordered_multimap>>>>::*)(unsigned long)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::reserve, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::reserve(unsigned long) --> void", pybind11::arg("__n")); + } +} + + // File: T42_stl_names_multi.cpp #include // foo +#include // std::deque +#include // std::forward_list #include // std::equal_to #include // std::hash #include // std::less +#include // __gnu_cxx::__normal_iterator +#include // std::list #include // std::_Rb_tree_const_iterator #include // std::_Rb_tree_iterator #include // std::multimap #include // std::allocator #include // std::multiset +#include // std::basic_string +#include // std::char_traits +#include // std::hash #include // std::__detail::_Node_const_iterator #include // std::__detail::_Node_iterator #include // std::unordered_multimap #include // std::unordered_multiset #include // std::pair +#include // std::vector #include #include @@ -246,18 +362,24 @@ void bind_std_unordered_set(std::function< pybind11::module &(std::string const void bind_T42_stl_names_multi(std::function< pybind11::module &(std::string const &namespace_) > &M) { - // foo(class std::multimap, class std::allocator > >) file:T42.stl.names.multi.hpp line:27 + // foo(class std::multimap, class std::allocator > >) file:T42.stl.names.multi.hpp line:31 M("").def("foo", (void (*)(class std::multimap, class std::allocator > >)) &foo, "C++: foo(class std::multimap, class std::allocator > >) --> void", pybind11::arg("")); - // foo(class std::multiset, class std::allocator >) file:T42.stl.names.multi.hpp line:28 + // foo(class std::multiset, class std::allocator >) file:T42.stl.names.multi.hpp line:32 M("").def("foo", (void (*)(class std::multiset, class std::allocator >)) &foo, "C++: foo(class std::multiset, class std::allocator >) --> void", pybind11::arg("")); - // foo(class std::unordered_multiset, struct std::equal_to, class std::allocator >) file:T42.stl.names.multi.hpp line:30 + // foo(class std::unordered_multiset, struct std::equal_to, class std::allocator >) file:T42.stl.names.multi.hpp line:34 M("").def("foo", (void (*)(class std::unordered_multiset, struct std::equal_to, class std::allocator >)) &foo, "C++: foo(class std::unordered_multiset, struct std::equal_to, class std::allocator >) --> void", pybind11::arg("")); - // foo(class std::unordered_multimap, struct std::equal_to, class std::allocator > >) file:T42.stl.names.multi.hpp line:31 + // foo(class std::unordered_multimap, struct std::equal_to, class std::allocator > >) file:T42.stl.names.multi.hpp line:35 M("").def("foo", (void (*)(class std::unordered_multimap, struct std::equal_to, class std::allocator > >)) &foo, "C++: foo(class std::unordered_multimap, struct std::equal_to, class std::allocator > >) --> void", pybind11::arg("")); + // foo(class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) file:T42.stl.names.multi.hpp line:37 + M("").def("foo", (void (*)(class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >)) &foo, "C++: foo(class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) --> void", pybind11::arg("")); + + // foo(class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) file:T42.stl.names.multi.hpp line:38 + M("").def("foo", (void (*)(class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >)) &foo, "C++: foo(class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) --> void", pybind11::arg("")); + } @@ -274,6 +396,7 @@ typedef std::function< pybind11::module & (std::string const &) > ModuleGetter; void bind_std_stl_function(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_std_functional_hash(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_std_unordered_set(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_std_unordered_map(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_T42_stl_names_multi(std::function< pybind11::module &(std::string const &namespace_) > &M); @@ -299,6 +422,7 @@ PYBIND11_MODULE(T42_stl_names_multi, root_module) { bind_std_stl_function(M); bind_std_functional_hash(M); bind_std_unordered_set(M); + bind_std_unordered_map(M); bind_T42_stl_names_multi(M); } @@ -308,6 +432,7 @@ PYBIND11_MODULE(T42_stl_names_multi, root_module) { // std/stl_function.cpp // std/functional_hash.cpp // std/unordered_set.cpp +// std/unordered_map.cpp // T42_stl_names_multi.cpp // Modules list file: TEST/T42_stl_names_multi.modules diff --git a/test/T42.stl.names.multimap.hpp b/test/T42.stl.names.multimap.hpp index 4948344f..376698ba 100644 --- a/test/T42.stl.names.multimap.hpp +++ b/test/T42.stl.names.multimap.hpp @@ -11,7 +11,7 @@ /// @author Sergey Lyskov/Andrii Verbytskyi /// This test is separated from the binder/test/T42.stl.names.hpp to avoid -/// problems with different ordering of multiset/set and multimap/map bindings +/// problems with different ordering of multiset/set and multimap/map bindings /// in the generated files on different platforms. #ifndef _INCLUDED_T42_stl_names_multi_hpp_ #define _INCLUDED_T42_stl_names_multi_hpp_ @@ -21,9 +21,16 @@ #include #include +#include +#include +#include +#include void foo(std::multimap ) {} void foo(std::unordered_multimap ) {} +void foo(std::multimap > > > > ) {} +void foo(std::unordered_multimap > > > > ) {} + #endif // _INCLUDED_T42_stl_names_multi_hpp_ diff --git a/test/T42.stl.names.multimap.ref b/test/T42.stl.names.multimap.ref index 94b1fe71..91dda6d2 100644 --- a/test/T42.stl.names.multimap.ref +++ b/test/T42.stl.names.multimap.ref @@ -38,17 +38,22 @@ void bind_std_stl_function(std::function< pybind11::module &(std::string const & // File: std/functional_hash.cpp +#include // std::deque +#include // std::forward_list #include // std::_Manager_operation #include // std::bad_function_call #include // std::hash #include // std::less #include // __gnu_cxx::__normal_iterator +#include // std::list #include // std::_Rb_tree_color #include // std::_Rb_tree_const_iterator #include // std::_Rb_tree_iterator #include // std::multimap #include // std::allocator #include // std::allocator_arg_t +#include // std::allocator_traits +#include // std::pointer_traits #include // __str__ #include // std::domain_error #include // std::invalid_argument @@ -64,6 +69,7 @@ void bind_std_stl_function(std::function< pybind11::module &(std::string const & #include // std::hash #include // std::tuple #include // std::pair +#include // std::vector #include #include @@ -104,18 +110,41 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons cl.def("count", (unsigned long (std::multimap::*)(const float &) const) &std::multimap, std::allocator > >::count, "C++: std::multimap, std::allocator > >::count(const float &) const --> unsigned long", pybind11::arg("__x")); cl.def("equal_range", (struct std::pair >, struct std::_Rb_tree_iterator > > (std::multimap::*)(const float &)) &std::multimap, std::allocator > >::equal_range, "C++: std::multimap, std::allocator > >::equal_range(const float &) --> struct std::pair >, struct std::_Rb_tree_iterator > >", pybind11::arg("__x")); } + { // std::multimap file:bits/stl_multimap.h line:95 + pybind11::class_>>>>, std::shared_ptr>>>>>> cl(M("std"), "multimap_float_std_list_std_forward_list_std_deque_std_vector_double_t", ""); + cl.def( pybind11::init( [](){ return new std::multimap>>>>(); } ) ); + cl.def( pybind11::init( [](const struct std::less & a0){ return new std::multimap>>>>(a0); } ), "doc" , pybind11::arg("__comp")); + cl.def( pybind11::init &, const class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &>(), pybind11::arg("__comp"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::multimap>>>> const &o){ return new std::multimap>>>>(o); } ) ); + cl.def("assign", (class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > & (std::multimap>>>>::*)(const class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::multimap>>>, std::less, std::allocator>>> > > >::operator=, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::operator=(const class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("get_allocator", (class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > (std::multimap>>>>::*)() const) &std::multimap>>>, std::less, std::allocator>>> > > >::get_allocator, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::get_allocator() const --> class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >"); + cl.def("empty", (bool (std::multimap>>>>::*)() const) &std::multimap>>>, std::less, std::allocator>>> > > >::empty, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::empty() const --> bool"); + cl.def("size", (unsigned long (std::multimap>>>>::*)() const) &std::multimap>>>, std::less, std::allocator>>> > > >::size, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::multimap>>>>::*)() const) &std::multimap>>>, std::less, std::allocator>>> > > >::max_size, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::max_size() const --> unsigned long"); + cl.def("erase", (unsigned long (std::multimap>>>>::*)(const float &)) &std::multimap>>>, std::less, std::allocator>>> > > >::erase, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::erase(const float &) --> unsigned long", pybind11::arg("__x")); + cl.def("swap", (void (std::multimap>>>>::*)(class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::multimap>>>, std::less, std::allocator>>> > > >::swap, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::swap(class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::multimap>>>>::*)()) &std::multimap>>>, std::less, std::allocator>>> > > >::clear, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::clear() --> void"); + cl.def("key_comp", (struct std::less (std::multimap>>>>::*)() const) &std::multimap>>>, std::less, std::allocator>>> > > >::key_comp, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::key_comp() const --> struct std::less"); + cl.def("count", (unsigned long (std::multimap>>>>::*)(const float &) const) &std::multimap>>>, std::less, std::allocator>>> > > >::count, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::count(const float &) const --> unsigned long", pybind11::arg("__x")); + cl.def("equal_range", (struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >, struct std::_Rb_tree_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > (std::multimap>>>>::*)(const float &)) &std::multimap>>>, std::less, std::allocator>>> > > >::equal_range, "C++: std::multimap>>>, std::less, std::allocator>>> > > >::equal_range(const float &) --> struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >, struct std::_Rb_tree_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >", pybind11::arg("__x")); + } } // File: std/unordered_map.cpp +#include // std::deque +#include // std::forward_list #include // std::equal_to #include // std::hash +#include // std::list #include // std::allocator #include // __str__ #include // std::__detail::_Node_const_iterator #include // std::__detail::_Node_iterator #include // std::unordered_multimap #include // std::pair +#include // std::vector #include #include @@ -161,14 +190,48 @@ void bind_std_unordered_map(std::function< pybind11::module &(std::string const cl.def("rehash", (void (std::unordered_multimap::*)(unsigned long)) &std::unordered_multimap, std::equal_to, std::allocator > >::rehash, "C++: std::unordered_multimap, std::equal_to, std::allocator > >::rehash(unsigned long) --> void", pybind11::arg("__n")); cl.def("reserve", (void (std::unordered_multimap::*)(unsigned long)) &std::unordered_multimap, std::equal_to, std::allocator > >::reserve, "C++: std::unordered_multimap, std::equal_to, std::allocator > >::reserve(unsigned long) --> void", pybind11::arg("__n")); } + { // std::unordered_multimap file:bits/unordered_map.h line:778 + pybind11::class_>>>>, std::shared_ptr>>>>>> cl(M("std"), "unordered_multimap_float_std_list_std_forward_list_std_deque_std_vector_double_t", ""); + cl.def( pybind11::init( [](){ return new std::unordered_multimap>>>>(); } ), "doc" ); + cl.def( pybind11::init( [](unsigned long const & a0){ return new std::unordered_multimap>>>>(a0); } ), "doc" , pybind11::arg("__n")); + cl.def( pybind11::init( [](unsigned long const & a0, const struct std::hash & a1){ return new std::unordered_multimap>>>>(a0, a1); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__hf")); + cl.def( pybind11::init( [](unsigned long const & a0, const struct std::hash & a1, const struct std::equal_to & a2){ return new std::unordered_multimap>>>>(a0, a1, a2); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql")); + cl.def( pybind11::init &, const struct std::equal_to &, const class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &>(), pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::unordered_multimap>>>> const &o){ return new std::unordered_multimap>>>>(o); } ) ); + cl.def("assign", (class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > & (std::unordered_multimap>>>>::*)(const class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::operator=, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::operator=(const class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("get_allocator", (class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::get_allocator, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::get_allocator() const --> class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >"); + cl.def("empty", (bool (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::empty, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::empty() const --> bool"); + cl.def("size", (unsigned long (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::size, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_size, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_size() const --> unsigned long"); + cl.def("erase", (unsigned long (std::unordered_multimap>>>>::*)(const float &)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::erase, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::erase(const float &) --> unsigned long", pybind11::arg("__x")); + cl.def("clear", (void (std::unordered_multimap>>>>::*)()) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::clear, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::clear() --> void"); + cl.def("swap", (void (std::unordered_multimap>>>>::*)(class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::swap, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::swap(class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > > &) --> void", pybind11::arg("__x")); + cl.def("hash_function", (struct std::hash (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::hash_function, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::hash_function() const --> struct std::hash"); + cl.def("key_eq", (struct std::equal_to (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::key_eq, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::key_eq() const --> struct std::equal_to"); + cl.def("count", (unsigned long (std::unordered_multimap>>>>::*)(const float &) const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::count, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::count(const float &) const --> unsigned long", pybind11::arg("__x")); + cl.def("equal_range", (struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, false>, struct std::__detail::_Node_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, false> > (std::unordered_multimap>>>>::*)(const float &)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::equal_range, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::equal_range(const float &) --> struct std::pair >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, false>, struct std::__detail::_Node_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, false, false> >", pybind11::arg("__x")); + cl.def("bucket_count", (unsigned long (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_count, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_count() const --> unsigned long"); + cl.def("max_bucket_count", (unsigned long (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_bucket_count, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_bucket_count() const --> unsigned long"); + cl.def("bucket_size", (unsigned long (std::unordered_multimap>>>>::*)(unsigned long) const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_size, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket_size(unsigned long) const --> unsigned long", pybind11::arg("__n")); + cl.def("bucket", (unsigned long (std::unordered_multimap>>>>::*)(const float &) const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::bucket(const float &) const --> unsigned long", pybind11::arg("__key")); + cl.def("load_factor", (float (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::load_factor, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::load_factor() const --> float"); + cl.def("max_load_factor", (float (std::unordered_multimap>>>>::*)() const) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor() const --> float"); + cl.def("max_load_factor", (void (std::unordered_multimap>>>>::*)(float)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::max_load_factor(float) --> void", pybind11::arg("__z")); + cl.def("rehash", (void (std::unordered_multimap>>>>::*)(unsigned long)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::rehash, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::rehash(unsigned long) --> void", pybind11::arg("__n")); + cl.def("reserve", (void (std::unordered_multimap>>>>::*)(unsigned long)) &std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::reserve, "C++: std::unordered_multimap>>>, std::hash, std::equal_to, std::allocator>>> > > >::reserve(unsigned long) --> void", pybind11::arg("__n")); + } } // File: T42_stl_names_multimap.cpp #include // foo +#include // std::deque +#include // std::forward_list #include // std::equal_to #include // std::hash #include // std::less +#include // std::list #include // std::_Rb_tree_const_iterator #include // std::_Rb_tree_iterator #include // std::multimap @@ -177,6 +240,7 @@ void bind_std_unordered_map(std::function< pybind11::module &(std::string const #include // std::__detail::_Node_iterator #include // std::unordered_multimap #include // std::pair +#include // std::vector #include #include @@ -191,12 +255,18 @@ void bind_std_unordered_map(std::function< pybind11::module &(std::string const void bind_T42_stl_names_multimap(std::function< pybind11::module &(std::string const &namespace_) > &M) { - // foo(class std::multimap, class std::allocator > >) file:T42.stl.names.multimap.hpp line:25 + // foo(class std::multimap, class std::allocator > >) file:T42.stl.names.multimap.hpp line:29 M("").def("foo", (void (*)(class std::multimap, class std::allocator > >)) &foo, "C++: foo(class std::multimap, class std::allocator > >) --> void", pybind11::arg("")); - // foo(class std::unordered_multimap, struct std::equal_to, class std::allocator > >) file:T42.stl.names.multimap.hpp line:27 + // foo(class std::unordered_multimap, struct std::equal_to, class std::allocator > >) file:T42.stl.names.multimap.hpp line:31 M("").def("foo", (void (*)(class std::unordered_multimap, struct std::equal_to, class std::allocator > >)) &foo, "C++: foo(class std::unordered_multimap, struct std::equal_to, class std::allocator > >) --> void", pybind11::arg("")); + // foo(class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) file:T42.stl.names.multimap.hpp line:33 + M("").def("foo", (void (*)(class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >)) &foo, "C++: foo(class std::multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) --> void", pybind11::arg("")); + + // foo(class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) file:T42.stl.names.multimap.hpp line:34 + M("").def("foo", (void (*)(class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >)) &foo, "C++: foo(class std::unordered_multimap >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::hash, struct std::equal_to, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > >) --> void", pybind11::arg("")); + } diff --git a/test/T42.stl.names.multiset.hpp b/test/T42.stl.names.multiset.hpp index 986eab84..16c26b8d 100644 --- a/test/T42.stl.names.multiset.hpp +++ b/test/T42.stl.names.multiset.hpp @@ -11,7 +11,7 @@ /// @author Sergey Lyskov/Andrii Verbytskyi /// This test is separated from the binder/test/T42.stl.names.hpp to avoid -/// problems with different ordering of multiset/set and multimap/map bindings +/// problems with different ordering of multiset/set and multimap/map bindings /// in the generated files on different platforms. #ifndef _INCLUDED_T42_stl_names_multiset_hpp_ #define _INCLUDED_T42_stl_names_multiset_hpp_ @@ -21,9 +21,14 @@ #include #include +#include +#include +#include +#include void foo(std::multiset ) {} void foo(std::unordered_multiset ) {} + #endif // _INCLUDED_T42_stl_names_multiset_hpp_ diff --git a/test/T42.stl.names.multiset.ref b/test/T42.stl.names.multiset.ref index 1cf6620b..e998c078 100644 --- a/test/T42.stl.names.multiset.ref +++ b/test/T42.stl.names.multiset.ref @@ -139,27 +139,27 @@ void bind_std_unordered_set(std::function< pybind11::module &(std::string const cl.def( pybind11::init &, const struct std::equal_to &, const class std::allocator &>(), pybind11::arg("__n"), pybind11::arg("__hf"), pybind11::arg("__eql"), pybind11::arg("__a") ); cl.def( pybind11::init( [](std::unordered_multiset const &o){ return new std::unordered_multiset(o); } ) ); - cl.def("assign", (class std::unordered_multiset, struct std::equal_to, class std::allocator > & (std::unordered_multiset::*)(const class std::unordered_multiset, struct std::equal_to, class std::allocator > &)) &std::unordered_multiset, std::equal_to, std::allocator >::operator=, "C++: std::unordered_multiset, std::equal_to, std::allocator >::operator=(const class std::unordered_multiset, struct std::equal_to, class std::allocator > &) --> class std::unordered_multiset, struct std::equal_to, class std::allocator > &", pybind11::return_value_policy::automatic, pybind11::arg("")); - cl.def("get_allocator", (class std::allocator (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::get_allocator, "C++: std::unordered_multiset, std::equal_to, std::allocator >::get_allocator() const --> class std::allocator"); - cl.def("empty", (bool (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::empty, "C++: std::unordered_multiset, std::equal_to, std::allocator >::empty() const --> bool"); - cl.def("size", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::size, "C++: std::unordered_multiset, std::equal_to, std::allocator >::size() const --> unsigned long"); - cl.def("max_size", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::max_size, "C++: std::unordered_multiset, std::equal_to, std::allocator >::max_size() const --> unsigned long"); - cl.def("erase", (unsigned long (std::unordered_multiset::*)(const float &)) &std::unordered_multiset, std::equal_to, std::allocator >::erase, "C++: std::unordered_multiset, std::equal_to, std::allocator >::erase(const float &) --> unsigned long", pybind11::arg("__x")); - cl.def("clear", (void (std::unordered_multiset::*)()) &std::unordered_multiset, std::equal_to, std::allocator >::clear, "C++: std::unordered_multiset, std::equal_to, std::allocator >::clear() --> void"); - cl.def("swap", (void (std::unordered_multiset::*)(class std::unordered_multiset, struct std::equal_to, class std::allocator > &)) &std::unordered_multiset, std::equal_to, std::allocator >::swap, "C++: std::unordered_multiset, std::equal_to, std::allocator >::swap(class std::unordered_multiset, struct std::equal_to, class std::allocator > &) --> void", pybind11::arg("__x")); - cl.def("hash_function", (struct std::hash (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::hash_function, "C++: std::unordered_multiset, std::equal_to, std::allocator >::hash_function() const --> struct std::hash"); - cl.def("key_eq", (struct std::equal_to (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::key_eq, "C++: std::unordered_multiset, std::equal_to, std::allocator >::key_eq() const --> struct std::equal_to"); - cl.def("count", (unsigned long (std::unordered_multiset::*)(const float &) const) &std::unordered_multiset, std::equal_to, std::allocator >::count, "C++: std::unordered_multiset, std::equal_to, std::allocator >::count(const float &) const --> unsigned long", pybind11::arg("__x")); - cl.def("equal_range", (struct std::pair, struct std::__detail::_Node_iterator > (std::unordered_multiset::*)(const float &)) &std::unordered_multiset, std::equal_to, std::allocator >::equal_range, "C++: std::unordered_multiset, std::equal_to, std::allocator >::equal_range(const float &) --> struct std::pair, struct std::__detail::_Node_iterator >", pybind11::arg("__x")); - cl.def("bucket_count", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::bucket_count, "C++: std::unordered_multiset, std::equal_to, std::allocator >::bucket_count() const --> unsigned long"); - cl.def("max_bucket_count", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::max_bucket_count, "C++: std::unordered_multiset, std::equal_to, std::allocator >::max_bucket_count() const --> unsigned long"); - cl.def("bucket_size", (unsigned long (std::unordered_multiset::*)(unsigned long) const) &std::unordered_multiset, std::equal_to, std::allocator >::bucket_size, "C++: std::unordered_multiset, std::equal_to, std::allocator >::bucket_size(unsigned long) const --> unsigned long", pybind11::arg("__n")); - cl.def("bucket", (unsigned long (std::unordered_multiset::*)(const float &) const) &std::unordered_multiset, std::equal_to, std::allocator >::bucket, "C++: std::unordered_multiset, std::equal_to, std::allocator >::bucket(const float &) const --> unsigned long", pybind11::arg("__key")); - cl.def("load_factor", (float (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::load_factor, "C++: std::unordered_multiset, std::equal_to, std::allocator >::load_factor() const --> float"); - cl.def("max_load_factor", (float (std::unordered_multiset::*)() const) &std::unordered_multiset, std::equal_to, std::allocator >::max_load_factor, "C++: std::unordered_multiset, std::equal_to, std::allocator >::max_load_factor() const --> float"); - cl.def("max_load_factor", (void (std::unordered_multiset::*)(float)) &std::unordered_multiset, std::equal_to, std::allocator >::max_load_factor, "C++: std::unordered_multiset, std::equal_to, std::allocator >::max_load_factor(float) --> void", pybind11::arg("__z")); - cl.def("rehash", (void (std::unordered_multiset::*)(unsigned long)) &std::unordered_multiset, std::equal_to, std::allocator >::rehash, "C++: std::unordered_multiset, std::equal_to, std::allocator >::rehash(unsigned long) --> void", pybind11::arg("__n")); - cl.def("reserve", (void (std::unordered_multiset::*)(unsigned long)) &std::unordered_multiset, std::equal_to, std::allocator >::reserve, "C++: std::unordered_multiset, std::equal_to, std::allocator >::reserve(unsigned long) --> void", pybind11::arg("__n")); + cl.def("assign", (class std::unordered_multiset, struct std::equal_to, class std::allocator > & (std::unordered_multiset::*)(const class std::unordered_multiset, struct std::equal_to, class std::allocator > &)) &std::unordered_multiset::operator=, "C++: std::unordered_multiset::operator=(const class std::unordered_multiset, struct std::equal_to, class std::allocator > &) --> class std::unordered_multiset, struct std::equal_to, class std::allocator > &", pybind11::return_value_policy::automatic, pybind11::arg("")); + cl.def("get_allocator", (class std::allocator (std::unordered_multiset::*)() const) &std::unordered_multiset::get_allocator, "C++: std::unordered_multiset::get_allocator() const --> class std::allocator"); + cl.def("empty", (bool (std::unordered_multiset::*)() const) &std::unordered_multiset::empty, "C++: std::unordered_multiset::empty() const --> bool"); + cl.def("size", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset::size, "C++: std::unordered_multiset::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset::max_size, "C++: std::unordered_multiset::max_size() const --> unsigned long"); + cl.def("erase", (unsigned long (std::unordered_multiset::*)(const float &)) &std::unordered_multiset::erase, "C++: std::unordered_multiset::erase(const float &) --> unsigned long", pybind11::arg("__x")); + cl.def("clear", (void (std::unordered_multiset::*)()) &std::unordered_multiset::clear, "C++: std::unordered_multiset::clear() --> void"); + cl.def("swap", (void (std::unordered_multiset::*)(class std::unordered_multiset, struct std::equal_to, class std::allocator > &)) &std::unordered_multiset::swap, "C++: std::unordered_multiset::swap(class std::unordered_multiset, struct std::equal_to, class std::allocator > &) --> void", pybind11::arg("__x")); + cl.def("hash_function", (struct std::hash (std::unordered_multiset::*)() const) &std::unordered_multiset::hash_function, "C++: std::unordered_multiset::hash_function() const --> struct std::hash"); + cl.def("key_eq", (struct std::equal_to (std::unordered_multiset::*)() const) &std::unordered_multiset::key_eq, "C++: std::unordered_multiset::key_eq() const --> struct std::equal_to"); + cl.def("count", (unsigned long (std::unordered_multiset::*)(const float &) const) &std::unordered_multiset::count, "C++: std::unordered_multiset::count(const float &) const --> unsigned long", pybind11::arg("__x")); + cl.def("equal_range", (struct std::pair, struct std::__detail::_Node_iterator > (std::unordered_multiset::*)(const float &)) &std::unordered_multiset::equal_range, "C++: std::unordered_multiset::equal_range(const float &) --> struct std::pair, struct std::__detail::_Node_iterator >", pybind11::arg("__x")); + cl.def("bucket_count", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset::bucket_count, "C++: std::unordered_multiset::bucket_count() const --> unsigned long"); + cl.def("max_bucket_count", (unsigned long (std::unordered_multiset::*)() const) &std::unordered_multiset::max_bucket_count, "C++: std::unordered_multiset::max_bucket_count() const --> unsigned long"); + cl.def("bucket_size", (unsigned long (std::unordered_multiset::*)(unsigned long) const) &std::unordered_multiset::bucket_size, "C++: std::unordered_multiset::bucket_size(unsigned long) const --> unsigned long", pybind11::arg("__n")); + cl.def("bucket", (unsigned long (std::unordered_multiset::*)(const float &) const) &std::unordered_multiset::bucket, "C++: std::unordered_multiset::bucket(const float &) const --> unsigned long", pybind11::arg("__key")); + cl.def("load_factor", (float (std::unordered_multiset::*)() const) &std::unordered_multiset::load_factor, "C++: std::unordered_multiset::load_factor() const --> float"); + cl.def("max_load_factor", (float (std::unordered_multiset::*)() const) &std::unordered_multiset::max_load_factor, "C++: std::unordered_multiset::max_load_factor() const --> float"); + cl.def("max_load_factor", (void (std::unordered_multiset::*)(float)) &std::unordered_multiset::max_load_factor, "C++: std::unordered_multiset::max_load_factor(float) --> void", pybind11::arg("__z")); + cl.def("rehash", (void (std::unordered_multiset::*)(unsigned long)) &std::unordered_multiset::rehash, "C++: std::unordered_multiset::rehash(unsigned long) --> void", pybind11::arg("__n")); + cl.def("reserve", (void (std::unordered_multiset::*)(unsigned long)) &std::unordered_multiset::reserve, "C++: std::unordered_multiset::reserve(unsigned long) --> void", pybind11::arg("__n")); } } @@ -190,10 +190,10 @@ void bind_std_unordered_set(std::function< pybind11::module &(std::string const void bind_T42_stl_names_multiset(std::function< pybind11::module &(std::string const &namespace_) > &M) { - // foo(class std::multiset, class std::allocator >) file:T42.stl.names.multiset.hpp line:25 + // foo(class std::multiset, class std::allocator >) file:T42.stl.names.multiset.hpp line:29 M("").def("foo", (void (*)(class std::multiset, class std::allocator >)) &foo, "C++: foo(class std::multiset, class std::allocator >) --> void", pybind11::arg("")); - // foo(class std::unordered_multiset, struct std::equal_to, class std::allocator >) file:T42.stl.names.multiset.hpp line:27 + // foo(class std::unordered_multiset, struct std::equal_to, class std::allocator >) file:T42.stl.names.multiset.hpp line:31 M("").def("foo", (void (*)(class std::unordered_multiset, struct std::equal_to, class std::allocator >)) &foo, "C++: foo(class std::unordered_multiset, struct std::equal_to, class std::allocator >) --> void", pybind11::arg("")); } diff --git a/test/T42.stl.names.ref b/test/T42.stl.names.ref index 5ed5c955..66ab9af8 100644 --- a/test/T42.stl.names.ref +++ b/test/T42.stl.names.ref @@ -1,9 +1,13 @@ // File: std/stl_list.cpp +#include // std::deque +#include // std::forward_list +#include // __gnu_cxx::__normal_iterator #include // std::list #include // std::allocator #include // std::allocator_traits #include // std::pointer_traits #include // __str__ +#include // std::vector #include #include @@ -23,31 +27,33 @@ void bind_std_stl_list(std::function< pybind11::module &(std::string const &name cl.def( pybind11::init( [](){ return new std::list(); } ) ); cl.def( pybind11::init &>(), pybind11::arg("__a") ); + cl.def( pybind11::init(), pybind11::arg("__n") ); + cl.def( pybind11::init( [](unsigned long const & a0, const double & a1){ return new std::list(a0, a1); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__value")); cl.def( pybind11::init &>(), pybind11::arg("__n"), pybind11::arg("__value"), pybind11::arg("__a") ); cl.def( pybind11::init( [](std::list const &o){ return new std::list(o); } ) ); - cl.def("assign", (class std::list > & (std::list::*)(const class std::list > &)) &std::list >::operator=, "C++: std::list >::operator=(const class std::list > &) --> class std::list > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); - cl.def("assign", (void (std::list::*)(unsigned long, const double &)) &std::list >::assign, "C++: std::list >::assign(unsigned long, const double &) --> void", pybind11::arg("__n"), pybind11::arg("__val")); - cl.def("get_allocator", (class std::allocator (std::list::*)() const) &std::list >::get_allocator, "C++: std::list >::get_allocator() const --> class std::allocator"); - cl.def("empty", (bool (std::list::*)() const) &std::list >::empty, "C++: std::list >::empty() const --> bool"); - cl.def("size", (unsigned long (std::list::*)() const) &std::list >::size, "C++: std::list >::size() const --> unsigned long"); - cl.def("max_size", (unsigned long (std::list::*)() const) &std::list >::max_size, "C++: std::list >::max_size() const --> unsigned long"); - cl.def("resize", (void (std::list::*)(unsigned long)) &std::list >::resize, "C++: std::list >::resize(unsigned long) --> void", pybind11::arg("__new_size")); - cl.def("resize", (void (std::list::*)(unsigned long, const double &)) &std::list >::resize, "C++: std::list >::resize(unsigned long, const double &) --> void", pybind11::arg("__new_size"), pybind11::arg("__x")); - cl.def("front", (double & (std::list::*)()) &std::list >::front, "C++: std::list >::front() --> double &", pybind11::return_value_policy::automatic); - cl.def("back", (double & (std::list::*)()) &std::list >::back, "C++: std::list >::back() --> double &", pybind11::return_value_policy::automatic); - cl.def("push_front", (void (std::list::*)(const double &)) &std::list >::push_front, "C++: std::list >::push_front(const double &) --> void", pybind11::arg("__x")); - cl.def("pop_front", (void (std::list::*)()) &std::list >::pop_front, "C++: std::list >::pop_front() --> void"); - cl.def("push_back", (void (std::list::*)(const double &)) &std::list >::push_back, "C++: std::list >::push_back(const double &) --> void", pybind11::arg("__x")); - cl.def("pop_back", (void (std::list::*)()) &std::list >::pop_back, "C++: std::list >::pop_back() --> void"); - cl.def("swap", (void (std::list::*)(class std::list > &)) &std::list >::swap, "C++: std::list >::swap(class std::list > &) --> void", pybind11::arg("__x")); - cl.def("clear", (void (std::list::*)()) &std::list >::clear, "C++: std::list >::clear() --> void"); - cl.def("remove", (void (std::list::*)(const double &)) &std::list >::remove, "C++: std::list >::remove(const double &) --> void", pybind11::arg("__value")); - cl.def("unique", (void (std::list::*)()) &std::list >::unique, "C++: std::list >::unique() --> void"); - cl.def("merge", (void (std::list::*)(class std::list > &)) &std::list >::merge, "C++: std::list >::merge(class std::list > &) --> void", pybind11::arg("__x")); - cl.def("reverse", (void (std::list::*)()) &std::list >::reverse, "C++: std::list >::reverse() --> void"); - cl.def("sort", (void (std::list::*)()) &std::list >::sort, "C++: std::list >::sort() --> void"); + cl.def("assign", (class std::list > & (std::list::*)(const class std::list > &)) &std::list::operator=, "C++: std::list::operator=(const class std::list > &) --> class std::list > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("assign", (void (std::list::*)(unsigned long, const double &)) &std::list::assign, "C++: std::list::assign(unsigned long, const double &) --> void", pybind11::arg("__n"), pybind11::arg("__val")); + cl.def("get_allocator", (class std::allocator (std::list::*)() const) &std::list::get_allocator, "C++: std::list::get_allocator() const --> class std::allocator"); + cl.def("empty", (bool (std::list::*)() const) &std::list::empty, "C++: std::list::empty() const --> bool"); + cl.def("size", (unsigned long (std::list::*)() const) &std::list::size, "C++: std::list::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::list::*)() const) &std::list::max_size, "C++: std::list::max_size() const --> unsigned long"); + cl.def("resize", (void (std::list::*)(unsigned long)) &std::list::resize, "C++: std::list::resize(unsigned long) --> void", pybind11::arg("__new_size")); + cl.def("resize", (void (std::list::*)(unsigned long, const double &)) &std::list::resize, "C++: std::list::resize(unsigned long, const double &) --> void", pybind11::arg("__new_size"), pybind11::arg("__x")); + cl.def("front", (double & (std::list::*)()) &std::list::front, "C++: std::list::front() --> double &", pybind11::return_value_policy::automatic); + cl.def("back", (double & (std::list::*)()) &std::list::back, "C++: std::list::back() --> double &", pybind11::return_value_policy::automatic); + cl.def("push_front", (void (std::list::*)(const double &)) &std::list::push_front, "C++: std::list::push_front(const double &) --> void", pybind11::arg("__x")); + cl.def("pop_front", (void (std::list::*)()) &std::list::pop_front, "C++: std::list::pop_front() --> void"); + cl.def("push_back", (void (std::list::*)(const double &)) &std::list::push_back, "C++: std::list::push_back(const double &) --> void", pybind11::arg("__x")); + cl.def("pop_back", (void (std::list::*)()) &std::list::pop_back, "C++: std::list::pop_back() --> void"); + cl.def("swap", (void (std::list::*)(class std::list > &)) &std::list::swap, "C++: std::list::swap(class std::list > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::list::*)()) &std::list::clear, "C++: std::list::clear() --> void"); + cl.def("remove", (void (std::list::*)(const double &)) &std::list::remove, "C++: std::list::remove(const double &) --> void", pybind11::arg("__value")); + cl.def("unique", (void (std::list::*)()) &std::list::unique, "C++: std::list::unique() --> void"); + cl.def("merge", (void (std::list::*)(class std::list > &)) &std::list::merge, "C++: std::list::merge(class std::list > &) --> void", pybind11::arg("__x")); + cl.def("reverse", (void (std::list::*)()) &std::list::reverse, "C++: std::list::reverse() --> void"); + cl.def("sort", (void (std::list::*)()) &std::list::sort, "C++: std::list::sort() --> void"); } } @@ -77,29 +83,31 @@ void bind_std_stl_deque(std::function< pybind11::module &(std::string const &nam cl.def( pybind11::init( [](){ return new std::deque(); } ) ); cl.def( pybind11::init &>(), pybind11::arg("__a") ); + cl.def( pybind11::init(), pybind11::arg("__n") ); + cl.def( pybind11::init( [](unsigned long const & a0, const int & a1){ return new std::deque(a0, a1); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__value")); cl.def( pybind11::init &>(), pybind11::arg("__n"), pybind11::arg("__value"), pybind11::arg("__a") ); cl.def( pybind11::init( [](std::deque const &o){ return new std::deque(o); } ) ); - cl.def("assign", (class std::deque > & (std::deque::*)(const class std::deque > &)) &std::deque >::operator=, "C++: std::deque >::operator=(const class std::deque > &) --> class std::deque > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); - cl.def("assign", (void (std::deque::*)(unsigned long, const int &)) &std::deque >::assign, "C++: std::deque >::assign(unsigned long, const int &) --> void", pybind11::arg("__n"), pybind11::arg("__val")); - cl.def("get_allocator", (class std::allocator (std::deque::*)() const) &std::deque >::get_allocator, "C++: std::deque >::get_allocator() const --> class std::allocator"); - cl.def("size", (unsigned long (std::deque::*)() const) &std::deque >::size, "C++: std::deque >::size() const --> unsigned long"); - cl.def("max_size", (unsigned long (std::deque::*)() const) &std::deque >::max_size, "C++: std::deque >::max_size() const --> unsigned long"); - cl.def("resize", (void (std::deque::*)(unsigned long)) &std::deque >::resize, "C++: std::deque >::resize(unsigned long) --> void", pybind11::arg("__new_size")); - cl.def("resize", (void (std::deque::*)(unsigned long, const int &)) &std::deque >::resize, "C++: std::deque >::resize(unsigned long, const int &) --> void", pybind11::arg("__new_size"), pybind11::arg("__x")); - cl.def("shrink_to_fit", (void (std::deque::*)()) &std::deque >::shrink_to_fit, "C++: std::deque >::shrink_to_fit() --> void"); - cl.def("empty", (bool (std::deque::*)() const) &std::deque >::empty, "C++: std::deque >::empty() const --> bool"); - cl.def("__getitem__", (int & (std::deque::*)(unsigned long)) &std::deque >::operator[], "C++: std::deque >::operator[](unsigned long) --> int &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); - cl.def("at", (int & (std::deque::*)(unsigned long)) &std::deque >::at, "C++: std::deque >::at(unsigned long) --> int &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); - cl.def("front", (int & (std::deque::*)()) &std::deque >::front, "C++: std::deque >::front() --> int &", pybind11::return_value_policy::automatic); - cl.def("back", (int & (std::deque::*)()) &std::deque >::back, "C++: std::deque >::back() --> int &", pybind11::return_value_policy::automatic); - cl.def("push_front", (void (std::deque::*)(const int &)) &std::deque >::push_front, "C++: std::deque >::push_front(const int &) --> void", pybind11::arg("__x")); - cl.def("push_back", (void (std::deque::*)(const int &)) &std::deque >::push_back, "C++: std::deque >::push_back(const int &) --> void", pybind11::arg("__x")); - cl.def("pop_front", (void (std::deque::*)()) &std::deque >::pop_front, "C++: std::deque >::pop_front() --> void"); - cl.def("pop_back", (void (std::deque::*)()) &std::deque >::pop_back, "C++: std::deque >::pop_back() --> void"); - cl.def("swap", (void (std::deque::*)(class std::deque > &)) &std::deque >::swap, "C++: std::deque >::swap(class std::deque > &) --> void", pybind11::arg("__x")); - cl.def("clear", (void (std::deque::*)()) &std::deque >::clear, "C++: std::deque >::clear() --> void"); + cl.def("assign", (class std::deque > & (std::deque::*)(const class std::deque > &)) &std::deque::operator=, "C++: std::deque::operator=(const class std::deque > &) --> class std::deque > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("assign", (void (std::deque::*)(unsigned long, const int &)) &std::deque::assign, "C++: std::deque::assign(unsigned long, const int &) --> void", pybind11::arg("__n"), pybind11::arg("__val")); + cl.def("get_allocator", (class std::allocator (std::deque::*)() const) &std::deque::get_allocator, "C++: std::deque::get_allocator() const --> class std::allocator"); + cl.def("size", (unsigned long (std::deque::*)() const) &std::deque::size, "C++: std::deque::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::deque::*)() const) &std::deque::max_size, "C++: std::deque::max_size() const --> unsigned long"); + cl.def("resize", (void (std::deque::*)(unsigned long)) &std::deque::resize, "C++: std::deque::resize(unsigned long) --> void", pybind11::arg("__new_size")); + cl.def("resize", (void (std::deque::*)(unsigned long, const int &)) &std::deque::resize, "C++: std::deque::resize(unsigned long, const int &) --> void", pybind11::arg("__new_size"), pybind11::arg("__x")); + cl.def("shrink_to_fit", (void (std::deque::*)()) &std::deque::shrink_to_fit, "C++: std::deque::shrink_to_fit() --> void"); + cl.def("empty", (bool (std::deque::*)() const) &std::deque::empty, "C++: std::deque::empty() const --> bool"); + cl.def("__getitem__", (int & (std::deque::*)(unsigned long)) &std::deque::operator[], "C++: std::deque::operator[](unsigned long) --> int &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); + cl.def("at", (int & (std::deque::*)(unsigned long)) &std::deque::at, "C++: std::deque::at(unsigned long) --> int &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); + cl.def("front", (int & (std::deque::*)()) &std::deque::front, "C++: std::deque::front() --> int &", pybind11::return_value_policy::automatic); + cl.def("back", (int & (std::deque::*)()) &std::deque::back, "C++: std::deque::back() --> int &", pybind11::return_value_policy::automatic); + cl.def("push_front", (void (std::deque::*)(const int &)) &std::deque::push_front, "C++: std::deque::push_front(const int &) --> void", pybind11::arg("__x")); + cl.def("push_back", (void (std::deque::*)(const int &)) &std::deque::push_back, "C++: std::deque::push_back(const int &) --> void", pybind11::arg("__x")); + cl.def("pop_front", (void (std::deque::*)()) &std::deque::pop_front, "C++: std::deque::pop_front() --> void"); + cl.def("pop_back", (void (std::deque::*)()) &std::deque::pop_back, "C++: std::deque::pop_back() --> void"); + cl.def("swap", (void (std::deque::*)(class std::deque > &)) &std::deque::swap, "C++: std::deque::swap(class std::deque > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::deque::*)()) &std::deque::clear, "C++: std::deque::clear() --> void"); } { // std::vector file:bits/stl_vector.h line:210 pybind11::class_, std::shared_ptr>> cl(M("std"), "vector_double_t", ""); @@ -115,33 +123,197 @@ void bind_std_stl_deque(std::function< pybind11::module &(std::string const &nam cl.def( pybind11::init( [](std::vector const &o){ return new std::vector(o); } ) ); cl.def( pybind11::init > &, const class std::allocator &>(), pybind11::arg("__x"), pybind11::arg("__a") ); - cl.def("assign", (class std::vector > & (std::vector::*)(const class std::vector > &)) &std::vector >::operator=, "C++: std::vector >::operator=(const class std::vector > &) --> class std::vector > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); - cl.def("assign", (void (std::vector::*)(unsigned long, const double &)) &std::vector >::assign, "C++: std::vector >::assign(unsigned long, const double &) --> void", pybind11::arg("__n"), pybind11::arg("__val")); - cl.def("begin", (class __gnu_cxx::__normal_iterator > > (std::vector::*)()) &std::vector >::begin, "C++: std::vector >::begin() --> class __gnu_cxx::__normal_iterator > >"); - cl.def("end", (class __gnu_cxx::__normal_iterator > > (std::vector::*)()) &std::vector >::end, "C++: std::vector >::end() --> class __gnu_cxx::__normal_iterator > >"); - cl.def("cbegin", (class __gnu_cxx::__normal_iterator > > (std::vector::*)() const) &std::vector >::cbegin, "C++: std::vector >::cbegin() const --> class __gnu_cxx::__normal_iterator > >"); - cl.def("cend", (class __gnu_cxx::__normal_iterator > > (std::vector::*)() const) &std::vector >::cend, "C++: std::vector >::cend() const --> class __gnu_cxx::__normal_iterator > >"); - cl.def("size", (unsigned long (std::vector::*)() const) &std::vector >::size, "C++: std::vector >::size() const --> unsigned long"); - cl.def("max_size", (unsigned long (std::vector::*)() const) &std::vector >::max_size, "C++: std::vector >::max_size() const --> unsigned long"); - cl.def("resize", (void (std::vector::*)(unsigned long)) &std::vector >::resize, "C++: std::vector >::resize(unsigned long) --> void", pybind11::arg("__new_size")); - cl.def("resize", (void (std::vector::*)(unsigned long, const double &)) &std::vector >::resize, "C++: std::vector >::resize(unsigned long, const double &) --> void", pybind11::arg("__new_size"), pybind11::arg("__x")); - cl.def("shrink_to_fit", (void (std::vector::*)()) &std::vector >::shrink_to_fit, "C++: std::vector >::shrink_to_fit() --> void"); - cl.def("capacity", (unsigned long (std::vector::*)() const) &std::vector >::capacity, "C++: std::vector >::capacity() const --> unsigned long"); - cl.def("empty", (bool (std::vector::*)() const) &std::vector >::empty, "C++: std::vector >::empty() const --> bool"); - cl.def("reserve", (void (std::vector::*)(unsigned long)) &std::vector >::reserve, "C++: std::vector >::reserve(unsigned long) --> void", pybind11::arg("__n")); - cl.def("__getitem__", (double & (std::vector::*)(unsigned long)) &std::vector >::operator[], "C++: std::vector >::operator[](unsigned long) --> double &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); - cl.def("at", (double & (std::vector::*)(unsigned long)) &std::vector >::at, "C++: std::vector >::at(unsigned long) --> double &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); - cl.def("front", (double & (std::vector::*)()) &std::vector >::front, "C++: std::vector >::front() --> double &", pybind11::return_value_policy::automatic); - cl.def("back", (double & (std::vector::*)()) &std::vector >::back, "C++: std::vector >::back() --> double &", pybind11::return_value_policy::automatic); - cl.def("data", (double * (std::vector::*)()) &std::vector >::data, "C++: std::vector >::data() --> double *", pybind11::return_value_policy::automatic); - cl.def("push_back", (void (std::vector::*)(const double &)) &std::vector >::push_back, "C++: std::vector >::push_back(const double &) --> void", pybind11::arg("__x")); - cl.def("pop_back", (void (std::vector::*)()) &std::vector >::pop_back, "C++: std::vector >::pop_back() --> void"); - cl.def("insert", (class __gnu_cxx::__normal_iterator > > (std::vector::*)(class __gnu_cxx::__normal_iterator > >, const double &)) &std::vector >::insert, "C++: std::vector >::insert(class __gnu_cxx::__normal_iterator > >, const double &) --> class __gnu_cxx::__normal_iterator > >", pybind11::arg("__position"), pybind11::arg("__x")); - cl.def("insert", (void (std::vector::*)(class __gnu_cxx::__normal_iterator > >, unsigned long, const double &)) &std::vector >::insert, "C++: std::vector >::insert(class __gnu_cxx::__normal_iterator > >, unsigned long, const double &) --> void", pybind11::arg("__position"), pybind11::arg("__n"), pybind11::arg("__x")); - cl.def("erase", (class __gnu_cxx::__normal_iterator > > (std::vector::*)(class __gnu_cxx::__normal_iterator > >)) &std::vector >::erase, "C++: std::vector >::erase(class __gnu_cxx::__normal_iterator > >) --> class __gnu_cxx::__normal_iterator > >", pybind11::arg("__position")); - cl.def("erase", (class __gnu_cxx::__normal_iterator > > (std::vector::*)(class __gnu_cxx::__normal_iterator > >, class __gnu_cxx::__normal_iterator > >)) &std::vector >::erase, "C++: std::vector >::erase(class __gnu_cxx::__normal_iterator > >, class __gnu_cxx::__normal_iterator > >) --> class __gnu_cxx::__normal_iterator > >", pybind11::arg("__first"), pybind11::arg("__last")); - cl.def("swap", (void (std::vector::*)(class std::vector > &)) &std::vector >::swap, "C++: std::vector >::swap(class std::vector > &) --> void", pybind11::arg("__x")); - cl.def("clear", (void (std::vector::*)()) &std::vector >::clear, "C++: std::vector >::clear() --> void"); + cl.def("assign", (class std::vector > & (std::vector::*)(const class std::vector > &)) &std::vector::operator=, "C++: std::vector::operator=(const class std::vector > &) --> class std::vector > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("assign", (void (std::vector::*)(unsigned long, const double &)) &std::vector::assign, "C++: std::vector::assign(unsigned long, const double &) --> void", pybind11::arg("__n"), pybind11::arg("__val")); + cl.def("begin", (class __gnu_cxx::__normal_iterator > > (std::vector::*)()) &std::vector::begin, "C++: std::vector::begin() --> class __gnu_cxx::__normal_iterator > >"); + cl.def("end", (class __gnu_cxx::__normal_iterator > > (std::vector::*)()) &std::vector::end, "C++: std::vector::end() --> class __gnu_cxx::__normal_iterator > >"); + cl.def("cbegin", (class __gnu_cxx::__normal_iterator > > (std::vector::*)() const) &std::vector::cbegin, "C++: std::vector::cbegin() const --> class __gnu_cxx::__normal_iterator > >"); + cl.def("cend", (class __gnu_cxx::__normal_iterator > > (std::vector::*)() const) &std::vector::cend, "C++: std::vector::cend() const --> class __gnu_cxx::__normal_iterator > >"); + cl.def("size", (unsigned long (std::vector::*)() const) &std::vector::size, "C++: std::vector::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::vector::*)() const) &std::vector::max_size, "C++: std::vector::max_size() const --> unsigned long"); + cl.def("resize", (void (std::vector::*)(unsigned long)) &std::vector::resize, "C++: std::vector::resize(unsigned long) --> void", pybind11::arg("__new_size")); + cl.def("resize", (void (std::vector::*)(unsigned long, const double &)) &std::vector::resize, "C++: std::vector::resize(unsigned long, const double &) --> void", pybind11::arg("__new_size"), pybind11::arg("__x")); + cl.def("shrink_to_fit", (void (std::vector::*)()) &std::vector::shrink_to_fit, "C++: std::vector::shrink_to_fit() --> void"); + cl.def("capacity", (unsigned long (std::vector::*)() const) &std::vector::capacity, "C++: std::vector::capacity() const --> unsigned long"); + cl.def("empty", (bool (std::vector::*)() const) &std::vector::empty, "C++: std::vector::empty() const --> bool"); + cl.def("reserve", (void (std::vector::*)(unsigned long)) &std::vector::reserve, "C++: std::vector::reserve(unsigned long) --> void", pybind11::arg("__n")); + cl.def("__getitem__", (double & (std::vector::*)(unsigned long)) &std::vector::operator[], "C++: std::vector::operator[](unsigned long) --> double &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); + cl.def("at", (double & (std::vector::*)(unsigned long)) &std::vector::at, "C++: std::vector::at(unsigned long) --> double &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); + cl.def("front", (double & (std::vector::*)()) &std::vector::front, "C++: std::vector::front() --> double &", pybind11::return_value_policy::automatic); + cl.def("back", (double & (std::vector::*)()) &std::vector::back, "C++: std::vector::back() --> double &", pybind11::return_value_policy::automatic); + cl.def("data", (double * (std::vector::*)()) &std::vector::data, "C++: std::vector::data() --> double *", pybind11::return_value_policy::automatic); + cl.def("push_back", (void (std::vector::*)(const double &)) &std::vector::push_back, "C++: std::vector::push_back(const double &) --> void", pybind11::arg("__x")); + cl.def("pop_back", (void (std::vector::*)()) &std::vector::pop_back, "C++: std::vector::pop_back() --> void"); + cl.def("insert", (class __gnu_cxx::__normal_iterator > > (std::vector::*)(class __gnu_cxx::__normal_iterator > >, const double &)) &std::vector::insert, "C++: std::vector::insert(class __gnu_cxx::__normal_iterator > >, const double &) --> class __gnu_cxx::__normal_iterator > >", pybind11::arg("__position"), pybind11::arg("__x")); + cl.def("insert", (void (std::vector::*)(class __gnu_cxx::__normal_iterator > >, unsigned long, const double &)) &std::vector::insert, "C++: std::vector::insert(class __gnu_cxx::__normal_iterator > >, unsigned long, const double &) --> void", pybind11::arg("__position"), pybind11::arg("__n"), pybind11::arg("__x")); + cl.def("erase", (class __gnu_cxx::__normal_iterator > > (std::vector::*)(class __gnu_cxx::__normal_iterator > >)) &std::vector::erase, "C++: std::vector::erase(class __gnu_cxx::__normal_iterator > >) --> class __gnu_cxx::__normal_iterator > >", pybind11::arg("__position")); + cl.def("erase", (class __gnu_cxx::__normal_iterator > > (std::vector::*)(class __gnu_cxx::__normal_iterator > >, class __gnu_cxx::__normal_iterator > >)) &std::vector::erase, "C++: std::vector::erase(class __gnu_cxx::__normal_iterator > >, class __gnu_cxx::__normal_iterator > >) --> class __gnu_cxx::__normal_iterator > >", pybind11::arg("__first"), pybind11::arg("__last")); + cl.def("swap", (void (std::vector::*)(class std::vector > &)) &std::vector::swap, "C++: std::vector::swap(class std::vector > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::vector::*)()) &std::vector::clear, "C++: std::vector::clear() --> void"); + } + { // std::vector file:bits/stl_vector.h line:210 + pybind11::class_>, std::shared_ptr>>> cl(M("std"), "vector_std_vector_double_t", ""); + cl.def( pybind11::init( [](){ return new std::vector>(); } ) ); + cl.def( pybind11::init > > &>(), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](unsigned long const & a0){ return new std::vector>(a0); } ), "doc" , pybind11::arg("__n")); + cl.def( pybind11::init > > &>(), pybind11::arg("__n"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](unsigned long const & a0, const class std::vector > & a1){ return new std::vector>(a0, a1); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__value")); + cl.def( pybind11::init > &, const class std::allocator > > &>(), pybind11::arg("__n"), pybind11::arg("__value"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::vector> const &o){ return new std::vector>(o); } ) ); + cl.def( pybind11::init >, class std::allocator > > > &, const class std::allocator > > &>(), pybind11::arg("__x"), pybind11::arg("__a") ); + + cl.def("assign", (class std::vector >, class std::allocator > > > & (std::vector>::*)(const class std::vector >, class std::allocator > > > &)) &std::vector>::operator=, "C++: std::vector>::operator=(const class std::vector >, class std::allocator > > > &) --> class std::vector >, class std::allocator > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("assign", (void (std::vector>::*)(unsigned long, const class std::vector > &)) &std::vector>::assign, "C++: std::vector>::assign(unsigned long, const class std::vector > &) --> void", pybind11::arg("__n"), pybind11::arg("__val")); + cl.def("begin", (class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > > (std::vector>::*)()) &std::vector>::begin, "C++: std::vector>::begin() --> class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >"); + cl.def("end", (class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > > (std::vector>::*)()) &std::vector>::end, "C++: std::vector>::end() --> class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >"); + cl.def("cbegin", (class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > > (std::vector>::*)() const) &std::vector>::cbegin, "C++: std::vector>::cbegin() const --> class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >"); + cl.def("cend", (class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > > (std::vector>::*)() const) &std::vector>::cend, "C++: std::vector>::cend() const --> class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >"); + cl.def("size", (unsigned long (std::vector>::*)() const) &std::vector>::size, "C++: std::vector>::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::vector>::*)() const) &std::vector>::max_size, "C++: std::vector>::max_size() const --> unsigned long"); + cl.def("resize", (void (std::vector>::*)(unsigned long)) &std::vector>::resize, "C++: std::vector>::resize(unsigned long) --> void", pybind11::arg("__new_size")); + cl.def("resize", (void (std::vector>::*)(unsigned long, const class std::vector > &)) &std::vector>::resize, "C++: std::vector>::resize(unsigned long, const class std::vector > &) --> void", pybind11::arg("__new_size"), pybind11::arg("__x")); + cl.def("shrink_to_fit", (void (std::vector>::*)()) &std::vector>::shrink_to_fit, "C++: std::vector>::shrink_to_fit() --> void"); + cl.def("capacity", (unsigned long (std::vector>::*)() const) &std::vector>::capacity, "C++: std::vector>::capacity() const --> unsigned long"); + cl.def("empty", (bool (std::vector>::*)() const) &std::vector>::empty, "C++: std::vector>::empty() const --> bool"); + cl.def("reserve", (void (std::vector>::*)(unsigned long)) &std::vector>::reserve, "C++: std::vector>::reserve(unsigned long) --> void", pybind11::arg("__n")); + cl.def("__getitem__", (class std::vector > & (std::vector>::*)(unsigned long)) &std::vector>::operator[], "C++: std::vector>::operator[](unsigned long) --> class std::vector > &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); + cl.def("at", (class std::vector > & (std::vector>::*)(unsigned long)) &std::vector>::at, "C++: std::vector>::at(unsigned long) --> class std::vector > &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); + cl.def("front", (class std::vector > & (std::vector>::*)()) &std::vector>::front, "C++: std::vector>::front() --> class std::vector > &", pybind11::return_value_policy::automatic); + cl.def("back", (class std::vector > & (std::vector>::*)()) &std::vector>::back, "C++: std::vector>::back() --> class std::vector > &", pybind11::return_value_policy::automatic); + cl.def("data", (class std::vector > * (std::vector>::*)()) &std::vector>::data, "C++: std::vector>::data() --> class std::vector > *", pybind11::return_value_policy::automatic); + cl.def("push_back", (void (std::vector>::*)(const class std::vector > &)) &std::vector>::push_back, "C++: std::vector>::push_back(const class std::vector > &) --> void", pybind11::arg("__x")); + cl.def("pop_back", (void (std::vector>::*)()) &std::vector>::pop_back, "C++: std::vector>::pop_back() --> void"); + cl.def("insert", (class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > > (std::vector>::*)(class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >, const class std::vector > &)) &std::vector>::insert, "C++: std::vector>::insert(class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >, const class std::vector > &) --> class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >", pybind11::arg("__position"), pybind11::arg("__x")); + cl.def("insert", (void (std::vector>::*)(class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >, unsigned long, const class std::vector > &)) &std::vector>::insert, "C++: std::vector>::insert(class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >, unsigned long, const class std::vector > &) --> void", pybind11::arg("__position"), pybind11::arg("__n"), pybind11::arg("__x")); + cl.def("erase", (class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > > (std::vector>::*)(class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >)) &std::vector>::erase, "C++: std::vector>::erase(class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >) --> class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >", pybind11::arg("__position")); + cl.def("erase", (class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > > (std::vector>::*)(class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >, class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >)) &std::vector>::erase, "C++: std::vector>::erase(class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >, class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >) --> class __gnu_cxx::__normal_iterator > *, class std::vector >, class std::allocator > > > >", pybind11::arg("__first"), pybind11::arg("__last")); + cl.def("swap", (void (std::vector>::*)(class std::vector >, class std::allocator > > > &)) &std::vector>::swap, "C++: std::vector>::swap(class std::vector >, class std::allocator > > > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::vector>::*)()) &std::vector>::clear, "C++: std::vector>::clear() --> void"); + } +} + + +// File: std/stl_vector.cpp +#include // __gnu_cxx::__normal_iterator +#include // std::allocator +#include // __str__ +#include // std::vector + +#include +#include +#include + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +void bind_std_stl_vector(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ + { // std::vector file:bits/stl_vector.h line:210 + pybind11::class_>>, std::shared_ptr>>>> cl(M("std"), "vector_std_vector_std_vector_double_t", ""); + cl.def( pybind11::init( [](){ return new std::vector>>(); } ) ); + cl.def( pybind11::init >, class std::allocator > > > > &>(), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](unsigned long const & a0){ return new std::vector>>(a0); } ), "doc" , pybind11::arg("__n")); + cl.def( pybind11::init >, class std::allocator > > > > &>(), pybind11::arg("__n"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](unsigned long const & a0, const class std::vector >, class std::allocator > > > & a1){ return new std::vector>>(a0, a1); } ), "doc" , pybind11::arg("__n"), pybind11::arg("__value")); + cl.def( pybind11::init >, class std::allocator > > > &, const class std::allocator >, class std::allocator > > > > &>(), pybind11::arg("__n"), pybind11::arg("__value"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::vector>> const &o){ return new std::vector>>(o); } ) ); + cl.def( pybind11::init >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &, const class std::allocator >, class std::allocator > > > > &>(), pybind11::arg("__x"), pybind11::arg("__a") ); + + cl.def("assign", (class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > & (std::vector>>::*)(const class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &)) &std::vector>>::operator=, "C++: std::vector>>::operator=(const class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &) --> class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("assign", (void (std::vector>>::*)(unsigned long, const class std::vector >, class std::allocator > > > &)) &std::vector>>::assign, "C++: std::vector>>::assign(unsigned long, const class std::vector >, class std::allocator > > > &) --> void", pybind11::arg("__n"), pybind11::arg("__val")); + cl.def("begin", (class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > (std::vector>>::*)()) &std::vector>>::begin, "C++: std::vector>>::begin() --> class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >"); + cl.def("end", (class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > (std::vector>>::*)()) &std::vector>>::end, "C++: std::vector>>::end() --> class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >"); + cl.def("cbegin", (class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > (std::vector>>::*)() const) &std::vector>>::cbegin, "C++: std::vector>>::cbegin() const --> class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >"); + cl.def("cend", (class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > (std::vector>>::*)() const) &std::vector>>::cend, "C++: std::vector>>::cend() const --> class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >"); + cl.def("size", (unsigned long (std::vector>>::*)() const) &std::vector>>::size, "C++: std::vector>>::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::vector>>::*)() const) &std::vector>>::max_size, "C++: std::vector>>::max_size() const --> unsigned long"); + cl.def("resize", (void (std::vector>>::*)(unsigned long)) &std::vector>>::resize, "C++: std::vector>>::resize(unsigned long) --> void", pybind11::arg("__new_size")); + cl.def("resize", (void (std::vector>>::*)(unsigned long, const class std::vector >, class std::allocator > > > &)) &std::vector>>::resize, "C++: std::vector>>::resize(unsigned long, const class std::vector >, class std::allocator > > > &) --> void", pybind11::arg("__new_size"), pybind11::arg("__x")); + cl.def("shrink_to_fit", (void (std::vector>>::*)()) &std::vector>>::shrink_to_fit, "C++: std::vector>>::shrink_to_fit() --> void"); + cl.def("capacity", (unsigned long (std::vector>>::*)() const) &std::vector>>::capacity, "C++: std::vector>>::capacity() const --> unsigned long"); + cl.def("empty", (bool (std::vector>>::*)() const) &std::vector>>::empty, "C++: std::vector>>::empty() const --> bool"); + cl.def("reserve", (void (std::vector>>::*)(unsigned long)) &std::vector>>::reserve, "C++: std::vector>>::reserve(unsigned long) --> void", pybind11::arg("__n")); + cl.def("__getitem__", (class std::vector >, class std::allocator > > > & (std::vector>>::*)(unsigned long)) &std::vector>>::operator[], "C++: std::vector>>::operator[](unsigned long) --> class std::vector >, class std::allocator > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); + cl.def("at", (class std::vector >, class std::allocator > > > & (std::vector>>::*)(unsigned long)) &std::vector>>::at, "C++: std::vector>>::at(unsigned long) --> class std::vector >, class std::allocator > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); + cl.def("front", (class std::vector >, class std::allocator > > > & (std::vector>>::*)()) &std::vector>>::front, "C++: std::vector>>::front() --> class std::vector >, class std::allocator > > > &", pybind11::return_value_policy::automatic); + cl.def("back", (class std::vector >, class std::allocator > > > & (std::vector>>::*)()) &std::vector>>::back, "C++: std::vector>>::back() --> class std::vector >, class std::allocator > > > &", pybind11::return_value_policy::automatic); + cl.def("data", (class std::vector >, class std::allocator > > > * (std::vector>>::*)()) &std::vector>>::data, "C++: std::vector>>::data() --> class std::vector >, class std::allocator > > > *", pybind11::return_value_policy::automatic); + cl.def("push_back", (void (std::vector>>::*)(const class std::vector >, class std::allocator > > > &)) &std::vector>>::push_back, "C++: std::vector>>::push_back(const class std::vector >, class std::allocator > > > &) --> void", pybind11::arg("__x")); + cl.def("pop_back", (void (std::vector>>::*)()) &std::vector>>::pop_back, "C++: std::vector>>::pop_back() --> void"); + cl.def("insert", (class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > (std::vector>>::*)(class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >, const class std::vector >, class std::allocator > > > &)) &std::vector>>::insert, "C++: std::vector>>::insert(class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >, const class std::vector >, class std::allocator > > > &) --> class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >", pybind11::arg("__position"), pybind11::arg("__x")); + cl.def("insert", (void (std::vector>>::*)(class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >, unsigned long, const class std::vector >, class std::allocator > > > &)) &std::vector>>::insert, "C++: std::vector>>::insert(class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >, unsigned long, const class std::vector >, class std::allocator > > > &) --> void", pybind11::arg("__position"), pybind11::arg("__n"), pybind11::arg("__x")); + cl.def("erase", (class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > (std::vector>>::*)(class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >)) &std::vector>>::erase, "C++: std::vector>>::erase(class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >) --> class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >", pybind11::arg("__position")); + cl.def("erase", (class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > (std::vector>>::*)(class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >, class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >)) &std::vector>>::erase, "C++: std::vector>>::erase(class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >, class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >) --> class __gnu_cxx::__normal_iterator >, class std::allocator > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > >", pybind11::arg("__first"), pybind11::arg("__last")); + cl.def("swap", (void (std::vector>>::*)(class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &)) &std::vector>>::swap, "C++: std::vector>>::swap(class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::vector>>::*)()) &std::vector>>::clear, "C++: std::vector>>::clear() --> void"); + } +} + + +// File: std/stl_vector_1.cpp +#include // std::deque +#include // std::forward_list +#include // __gnu_cxx::__normal_iterator +#include // std::list +#include // std::allocator +#include // __str__ +#include // std::vector + +#include +#include +#include + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +void bind_std_stl_vector_1(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ + { // std::vector file:bits/stl_vector.h line:210 + pybind11::class_>>>, std::shared_ptr>>>>> cl(M("std"), "vector_std_list_std_forward_list_std_deque_double_t", ""); + cl.def( pybind11::init( [](){ return new std::vector>>>(); } ) ); + cl.def( pybind11::init >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > &>(), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](unsigned long const & a0){ return new std::vector>>>(a0); } ), "doc" , pybind11::arg("__n")); + cl.def( pybind11::init >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > &>(), pybind11::arg("__n"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::vector>>> const &o){ return new std::vector>>>(o); } ) ); + cl.def( pybind11::init >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &, const class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > &>(), pybind11::arg("__x"), pybind11::arg("__a") ); + + cl.def("assign", (class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > & (std::vector>>>::*)(const class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &)) &std::vector>>>::operator=, "C++: std::vector>>>::operator=(const class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &) --> class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("begin", (class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > (std::vector>>>::*)()) &std::vector>>>::begin, "C++: std::vector>>>::begin() --> class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >"); + cl.def("end", (class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > (std::vector>>>::*)()) &std::vector>>>::end, "C++: std::vector>>>::end() --> class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >"); + cl.def("cbegin", (class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > (std::vector>>>::*)() const) &std::vector>>>::cbegin, "C++: std::vector>>>::cbegin() const --> class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >"); + cl.def("cend", (class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > (std::vector>>>::*)() const) &std::vector>>>::cend, "C++: std::vector>>>::cend() const --> class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >"); + cl.def("size", (unsigned long (std::vector>>>::*)() const) &std::vector>>>::size, "C++: std::vector>>>::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::vector>>>::*)() const) &std::vector>>>::max_size, "C++: std::vector>>>::max_size() const --> unsigned long"); + cl.def("resize", (void (std::vector>>>::*)(unsigned long)) &std::vector>>>::resize, "C++: std::vector>>>::resize(unsigned long) --> void", pybind11::arg("__new_size")); + cl.def("shrink_to_fit", (void (std::vector>>>::*)()) &std::vector>>>::shrink_to_fit, "C++: std::vector>>>::shrink_to_fit() --> void"); + cl.def("capacity", (unsigned long (std::vector>>>::*)() const) &std::vector>>>::capacity, "C++: std::vector>>>::capacity() const --> unsigned long"); + cl.def("empty", (bool (std::vector>>>::*)() const) &std::vector>>>::empty, "C++: std::vector>>>::empty() const --> bool"); + cl.def("reserve", (void (std::vector>>>::*)(unsigned long)) &std::vector>>>::reserve, "C++: std::vector>>>::reserve(unsigned long) --> void", pybind11::arg("__n")); + cl.def("__getitem__", (class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > & (std::vector>>>::*)(unsigned long)) &std::vector>>>::operator[], "C++: std::vector>>>::operator[](unsigned long) --> class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); + cl.def("at", (class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > & (std::vector>>>::*)(unsigned long)) &std::vector>>>::at, "C++: std::vector>>>::at(unsigned long) --> class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__n")); + cl.def("front", (class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > & (std::vector>>>::*)()) &std::vector>>>::front, "C++: std::vector>>>::front() --> class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &", pybind11::return_value_policy::automatic); + cl.def("back", (class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > & (std::vector>>>::*)()) &std::vector>>>::back, "C++: std::vector>>>::back() --> class std::list >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > &", pybind11::return_value_policy::automatic); + cl.def("pop_back", (void (std::vector>>>::*)()) &std::vector>>>::pop_back, "C++: std::vector>>>::pop_back() --> void"); + cl.def("erase", (class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > (std::vector>>>::*)(class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >)) &std::vector>>>::erase, "C++: std::vector>>>::erase(class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >) --> class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >", pybind11::arg("__position")); + cl.def("erase", (class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > (std::vector>>>::*)(class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >)) &std::vector>>>::erase, "C++: std::vector>>>::erase(class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >) --> class __gnu_cxx::__normal_iterator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > *, class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >", pybind11::arg("__first"), pybind11::arg("__last")); + cl.def("swap", (void (std::vector>>>::*)(class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &)) &std::vector>>>::swap, "C++: std::vector>>>::swap(class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::vector>>>::*)()) &std::vector>>>::clear, "C++: std::vector>>>::clear() --> void"); } } @@ -178,23 +350,23 @@ void bind_std_forward_list(std::function< pybind11::module &(std::string const & cl.def( pybind11::init &>(), pybind11::arg("__n"), pybind11::arg("__value"), pybind11::arg("__al") ); cl.def( pybind11::init( [](std::forward_list const &o){ return new std::forward_list(o); } ) ); - cl.def("assign", (class std::forward_list > & (std::forward_list::*)(const class std::forward_list > &)) &std::forward_list >::operator=, "C++: std::forward_list >::operator=(const class std::forward_list > &) --> class std::forward_list > &", pybind11::return_value_policy::automatic, pybind11::arg("__list")); - cl.def("assign", (void (std::forward_list::*)(unsigned long, const float &)) &std::forward_list >::assign, "C++: std::forward_list >::assign(unsigned long, const float &) --> void", pybind11::arg("__n"), pybind11::arg("__val")); - cl.def("get_allocator", (class std::allocator (std::forward_list::*)() const) &std::forward_list >::get_allocator, "C++: std::forward_list >::get_allocator() const --> class std::allocator"); - cl.def("empty", (bool (std::forward_list::*)() const) &std::forward_list >::empty, "C++: std::forward_list >::empty() const --> bool"); - cl.def("max_size", (unsigned long (std::forward_list::*)() const) &std::forward_list >::max_size, "C++: std::forward_list >::max_size() const --> unsigned long"); - cl.def("front", (float & (std::forward_list::*)()) &std::forward_list >::front, "C++: std::forward_list >::front() --> float &", pybind11::return_value_policy::automatic); - cl.def("push_front", (void (std::forward_list::*)(const float &)) &std::forward_list >::push_front, "C++: std::forward_list >::push_front(const float &) --> void", pybind11::arg("__val")); - cl.def("pop_front", (void (std::forward_list::*)()) &std::forward_list >::pop_front, "C++: std::forward_list >::pop_front() --> void"); - cl.def("swap", (void (std::forward_list::*)(class std::forward_list > &)) &std::forward_list >::swap, "C++: std::forward_list >::swap(class std::forward_list > &) --> void", pybind11::arg("__list")); - cl.def("resize", (void (std::forward_list::*)(unsigned long)) &std::forward_list >::resize, "C++: std::forward_list >::resize(unsigned long) --> void", pybind11::arg("__sz")); - cl.def("resize", (void (std::forward_list::*)(unsigned long, const float &)) &std::forward_list >::resize, "C++: std::forward_list >::resize(unsigned long, const float &) --> void", pybind11::arg("__sz"), pybind11::arg("__val")); - cl.def("clear", (void (std::forward_list::*)()) &std::forward_list >::clear, "C++: std::forward_list >::clear() --> void"); - cl.def("remove", (void (std::forward_list::*)(const float &)) &std::forward_list >::remove, "C++: std::forward_list >::remove(const float &) --> void", pybind11::arg("__val")); - cl.def("unique", (void (std::forward_list::*)()) &std::forward_list >::unique, "C++: std::forward_list >::unique() --> void"); - cl.def("merge", (void (std::forward_list::*)(class std::forward_list > &)) &std::forward_list >::merge, "C++: std::forward_list >::merge(class std::forward_list > &) --> void", pybind11::arg("__list")); - cl.def("sort", (void (std::forward_list::*)()) &std::forward_list >::sort, "C++: std::forward_list >::sort() --> void"); - cl.def("reverse", (void (std::forward_list::*)()) &std::forward_list >::reverse, "C++: std::forward_list >::reverse() --> void"); + cl.def("assign", (class std::forward_list > & (std::forward_list::*)(const class std::forward_list > &)) &std::forward_list::operator=, "C++: std::forward_list::operator=(const class std::forward_list > &) --> class std::forward_list > &", pybind11::return_value_policy::automatic, pybind11::arg("__list")); + cl.def("assign", (void (std::forward_list::*)(unsigned long, const float &)) &std::forward_list::assign, "C++: std::forward_list::assign(unsigned long, const float &) --> void", pybind11::arg("__n"), pybind11::arg("__val")); + cl.def("get_allocator", (class std::allocator (std::forward_list::*)() const) &std::forward_list::get_allocator, "C++: std::forward_list::get_allocator() const --> class std::allocator"); + cl.def("empty", (bool (std::forward_list::*)() const) &std::forward_list::empty, "C++: std::forward_list::empty() const --> bool"); + cl.def("max_size", (unsigned long (std::forward_list::*)() const) &std::forward_list::max_size, "C++: std::forward_list::max_size() const --> unsigned long"); + cl.def("front", (float & (std::forward_list::*)()) &std::forward_list::front, "C++: std::forward_list::front() --> float &", pybind11::return_value_policy::automatic); + cl.def("push_front", (void (std::forward_list::*)(const float &)) &std::forward_list::push_front, "C++: std::forward_list::push_front(const float &) --> void", pybind11::arg("__val")); + cl.def("pop_front", (void (std::forward_list::*)()) &std::forward_list::pop_front, "C++: std::forward_list::pop_front() --> void"); + cl.def("swap", (void (std::forward_list::*)(class std::forward_list > &)) &std::forward_list::swap, "C++: std::forward_list::swap(class std::forward_list > &) --> void", pybind11::arg("__list")); + cl.def("resize", (void (std::forward_list::*)(unsigned long)) &std::forward_list::resize, "C++: std::forward_list::resize(unsigned long) --> void", pybind11::arg("__sz")); + cl.def("resize", (void (std::forward_list::*)(unsigned long, const float &)) &std::forward_list::resize, "C++: std::forward_list::resize(unsigned long, const float &) --> void", pybind11::arg("__sz"), pybind11::arg("__val")); + cl.def("clear", (void (std::forward_list::*)()) &std::forward_list::clear, "C++: std::forward_list::clear() --> void"); + cl.def("remove", (void (std::forward_list::*)(const float &)) &std::forward_list::remove, "C++: std::forward_list::remove(const float &) --> void", pybind11::arg("__val")); + cl.def("unique", (void (std::forward_list::*)()) &std::forward_list::unique, "C++: std::forward_list::unique() --> void"); + cl.def("merge", (void (std::forward_list::*)(class std::forward_list > &)) &std::forward_list::merge, "C++: std::forward_list::merge(class std::forward_list > &) --> void", pybind11::arg("__list")); + cl.def("sort", (void (std::forward_list::*)()) &std::forward_list::sort, "C++: std::forward_list::sort() --> void"); + cl.def("reverse", (void (std::forward_list::*)()) &std::forward_list::reverse, "C++: std::forward_list::reverse() --> void"); } } @@ -221,18 +393,27 @@ void bind_std_forward_list(std::function< pybind11::module &(std::string const & void bind_T42_stl_names(std::function< pybind11::module &(std::string const &namespace_) > &M) { - // foo(class std::list >) file:T42.stl.names.hpp line:26 + // foo(class std::list >) file:T42.stl.names.hpp line:25 M("").def("foo", (void (*)(class std::list >)) &foo, "C++: foo(class std::list >) --> void", pybind11::arg("")); - // foo(class std::forward_list >) file:T42.stl.names.hpp line:27 + // foo(class std::forward_list >) file:T42.stl.names.hpp line:26 M("").def("foo", (void (*)(class std::forward_list >)) &foo, "C++: foo(class std::forward_list >) --> void", pybind11::arg("")); - // foo(class std::vector >) file:T42.stl.names.hpp line:28 + // foo(class std::vector >) file:T42.stl.names.hpp line:27 M("").def("foo", (void (*)(class std::vector >)) &foo, "C++: foo(class std::vector >) --> void", pybind11::arg("")); - // foo(class std::deque >) file:T42.stl.names.hpp line:29 + // foo(class std::deque >) file:T42.stl.names.hpp line:28 M("").def("foo", (void (*)(class std::deque >)) &foo, "C++: foo(class std::deque >) --> void", pybind11::arg("")); + // foo(class std::vector >, class std::allocator > > >) file:T42.stl.names.hpp line:30 + M("").def("foo", (void (*)(class std::vector >, class std::allocator > > >)) &foo, "C++: foo(class std::vector >, class std::allocator > > >) --> void", pybind11::arg("")); + + // foo(class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >) file:T42.stl.names.hpp line:31 + M("").def("foo", (void (*)(class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >)) &foo, "C++: foo(class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >) --> void", pybind11::arg("")); + + // foo(class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >) file:T42.stl.names.hpp line:33 + M("").def("foo", (void (*)(class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >)) &foo, "C++: foo(class std::vector >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >) --> void", pybind11::arg("")); + } @@ -248,6 +429,8 @@ typedef std::function< pybind11::module & (std::string const &) > ModuleGetter; void bind_std_stl_list(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_std_stl_deque(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_std_stl_vector(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_std_stl_vector_1(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_std_forward_list(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_T42_stl_names(std::function< pybind11::module &(std::string const &namespace_) > &M); @@ -273,6 +456,8 @@ PYBIND11_MODULE(T42_stl_names, root_module) { bind_std_stl_list(M); bind_std_stl_deque(M); + bind_std_stl_vector(M); + bind_std_stl_vector_1(M); bind_std_forward_list(M); bind_T42_stl_names(M); @@ -282,6 +467,8 @@ PYBIND11_MODULE(T42_stl_names, root_module) { // T42_stl_names.cpp // std/stl_list.cpp // std/stl_deque.cpp +// std/stl_vector.cpp +// std/stl_vector_1.cpp // std/forward_list.cpp // T42_stl_names.cpp diff --git a/test/T42.stl.names.set.hpp b/test/T42.stl.names.set.hpp index 95b2691b..c6ad9de8 100644 --- a/test/T42.stl.names.set.hpp +++ b/test/T42.stl.names.set.hpp @@ -11,7 +11,7 @@ /// @author Sergey Lyskov /// The multimap/multiset classes are tested in the binder/test/T43.stl.names.multi.hpp to avoid -/// problems with different ordering of multiset/set and multimap/map bindings +/// problems with different ordering of multiset/set and multimap/map bindings /// in the generated files on different platforms. #ifndef _INCLUDED_T42_stl_names_set_hpp_ #define _INCLUDED_T42_stl_names_set_hpp_ @@ -20,8 +20,15 @@ #include #include +#include +#include +#include +#include +#include + void foo(std::set ) {} void foo(std::unordered_set ) {} +void foo(std::set > > > > ) {} #endif // _INCLUDED_T42_stl_names_set_hpp_ diff --git a/test/T42.stl.names.set.ref b/test/T42.stl.names.set.ref index c2e2c7f6..fd37ce3b 100644 --- a/test/T42.stl.names.set.ref +++ b/test/T42.stl.names.set.ref @@ -1,13 +1,18 @@ // File: std/stl_function.cpp +#include // std::deque #include // std::bad_exception #include // std::exception #include // std::terminate #include // std::uncaught_exception #include // std::unexpected +#include // std::forward_list #include // std::binary_function #include // std::equal_to #include // std::less +#include // std::list +#include // std::allocator #include // __str__ +#include // std::vector #include #include @@ -38,12 +43,14 @@ void bind_std_stl_function(std::function< pybind11::module &(std::string const & // File: std/functional_hash.cpp +#include // std::deque +#include // std::forward_list #include // std::_Manager_operation #include // std::bad_function_call -#include // std::equal_to #include // std::hash #include // std::less #include // __gnu_cxx::__normal_iterator +#include // std::list #include // std::_Rb_tree_color #include // std::_Rb_tree_const_iterator #include // std::allocator @@ -63,10 +70,8 @@ void bind_std_stl_function(std::function< pybind11::module &(std::string const & #include // std::char_traits #include // std::hash #include // std::tuple -#include // std::__detail::_Node_const_iterator -#include // std::__detail::_Node_iterator -#include // std::unordered_set #include // std::pair +#include // std::vector #include #include @@ -109,6 +114,49 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons cl.def("count", (unsigned long (std::set::*)(const float &) const) &std::set, std::allocator >::count, "C++: std::set, std::allocator >::count(const float &) const --> unsigned long", pybind11::arg("__x")); cl.def("equal_range", (struct std::pair, struct std::_Rb_tree_const_iterator > (std::set::*)(const float &)) &std::set, std::allocator >::equal_range, "C++: std::set, std::allocator >::equal_range(const float &) --> struct std::pair, struct std::_Rb_tree_const_iterator >", pybind11::arg("__x")); } + { // std::set file:bits/stl_set.h line:90 + pybind11::class_>>>,std::less>>> >,std::allocator>>> >>, std::shared_ptr>>>,std::less>>> >,std::allocator>>> >>>> cl(M("std"), "set_std_list_std_forward_list_std_deque_std_vector_double_std_less_std_list_std_forward_list_std_deque_std_vector_double_std_allocator_std_list_std_forward_list_std_deque_std_vector_double_t", ""); + cl.def( pybind11::init( [](){ return new std::set>>>,std::less>>> >,std::allocator>>> >>(); } ) ); + cl.def( pybind11::init( [](const struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > & a0){ return new std::set>>>,std::less>>> >,std::allocator>>> >>(a0); } ), "doc" , pybind11::arg("__comp")); + cl.def( pybind11::init >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > &, const class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > &>(), pybind11::arg("__comp"), pybind11::arg("__a") ); + + cl.def( pybind11::init( [](std::set>>>,std::less>>> >,std::allocator>>> >> const &o){ return new std::set>>>,std::less>>> >,std::allocator>>> >>(o); } ) ); + cl.def("assign", (class std::set >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > & (std::set>>>,std::less>>> >,std::allocator>>> >>::*)(const class std::set >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &)) &std::set>>>, std::less>>> >, std::allocator>>> > >::operator=, "C++: std::set>>>, std::less>>> >, std::allocator>>> > >::operator=(const class std::set >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &) --> class std::set >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &", pybind11::return_value_policy::automatic, pybind11::arg("__x")); + cl.def("key_comp", (struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > (std::set>>>,std::less>>> >,std::allocator>>> >>::*)() const) &std::set>>>, std::less>>> >, std::allocator>>> > >::key_comp, "C++: std::set>>>, std::less>>> >, std::allocator>>> > >::key_comp() const --> struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >"); + cl.def("value_comp", (struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > (std::set>>>,std::less>>> >,std::allocator>>> >>::*)() const) &std::set>>>, std::less>>> >, std::allocator>>> > >::value_comp, "C++: std::set>>>, std::less>>> >, std::allocator>>> > >::value_comp() const --> struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >"); + cl.def("get_allocator", (class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > (std::set>>>,std::less>>> >,std::allocator>>> >>::*)() const) &std::set>>>, std::less>>> >, std::allocator>>> > >::get_allocator, "C++: std::set>>>, std::less>>> >, std::allocator>>> > >::get_allocator() const --> class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >"); + cl.def("empty", (bool (std::set>>>,std::less>>> >,std::allocator>>> >>::*)() const) &std::set>>>, std::less>>> >, std::allocator>>> > >::empty, "C++: std::set>>>, std::less>>> >, std::allocator>>> > >::empty() const --> bool"); + cl.def("size", (unsigned long (std::set>>>,std::less>>> >,std::allocator>>> >>::*)() const) &std::set>>>, std::less>>> >, std::allocator>>> > >::size, "C++: std::set>>>, std::less>>> >, std::allocator>>> > >::size() const --> unsigned long"); + cl.def("max_size", (unsigned long (std::set>>>,std::less>>> >,std::allocator>>> >>::*)() const) &std::set>>>, std::less>>> >, std::allocator>>> > >::max_size, "C++: std::set>>>, std::less>>> >, std::allocator>>> > >::max_size() const --> unsigned long"); + cl.def("swap", (void (std::set>>>,std::less>>> >,std::allocator>>> >>::*)(class std::set >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &)) &std::set>>>, std::less>>> >, std::allocator>>> > >::swap, "C++: std::set>>>, std::less>>> >, std::allocator>>> > >::swap(class std::set >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > > &) --> void", pybind11::arg("__x")); + cl.def("clear", (void (std::set>>>,std::less>>> >,std::allocator>>> >>::*)()) &std::set>>>, std::less>>> >, std::allocator>>> > >::clear, "C++: std::set>>>, std::less>>> >, std::allocator>>> > >::clear() --> void"); + } +} + + +// File: std/unordered_set.cpp +#include // std::equal_to +#include // std::hash +#include // std::allocator +#include // __str__ +#include // std::__detail::_Node_const_iterator +#include // std::__detail::_Node_iterator +#include // std::unordered_set +#include // std::pair + +#include +#include +#include + +#ifndef BINDER_PYBIND11_TYPE_CASTER + #define BINDER_PYBIND11_TYPE_CASTER + PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr) + PYBIND11_DECLARE_HOLDER_TYPE(T, T*) + PYBIND11_MAKE_OPAQUE(std::shared_ptr) +#endif + +void bind_std_unordered_set(std::function< pybind11::module &(std::string const &namespace_) > &M) +{ { // std::unordered_set file:bits/unordered_set.h line:93 pybind11::class_, std::shared_ptr>> cl(M("std"), "unordered_set_float_t", ""); cl.def( pybind11::init( [](){ return new std::unordered_set(); } ), "doc" ); @@ -146,9 +194,12 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons // File: T42_stl_names_set.cpp #include // foo +#include // std::deque +#include // std::forward_list #include // std::equal_to #include // std::hash #include // std::less +#include // std::list #include // std::_Rb_tree_const_iterator #include // std::allocator #include // std::set @@ -156,6 +207,7 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons #include // std::__detail::_Node_iterator #include // std::unordered_set #include // std::pair +#include // std::vector #include #include @@ -170,12 +222,15 @@ void bind_std_functional_hash(std::function< pybind11::module &(std::string cons void bind_T42_stl_names_set(std::function< pybind11::module &(std::string const &namespace_) > &M) { - // foo(class std::set, class std::allocator >) file:T42.stl.names.set.hpp line:23 + // foo(class std::set, class std::allocator >) file:T42.stl.names.set.hpp line:29 M("").def("foo", (void (*)(class std::set, class std::allocator >)) &foo, "C++: foo(class std::set, class std::allocator >) --> void", pybind11::arg("")); - // foo(class std::unordered_set, struct std::equal_to, class std::allocator >) file:T42.stl.names.set.hpp line:24 + // foo(class std::unordered_set, struct std::equal_to, class std::allocator >) file:T42.stl.names.set.hpp line:30 M("").def("foo", (void (*)(class std::unordered_set, struct std::equal_to, class std::allocator >)) &foo, "C++: foo(class std::unordered_set, struct std::equal_to, class std::allocator >) --> void", pybind11::arg("")); + // foo(class std::set >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >) file:T42.stl.names.set.hpp line:32 + M("").def("foo", (void (*)(class std::set >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >)) &foo, "C++: foo(class std::set >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > >, struct std::less >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > >, class std::allocator >, class std::allocator > > >, class std::allocator >, class std::allocator > > > > > > > > >) --> void", pybind11::arg("")); + } @@ -191,6 +246,7 @@ typedef std::function< pybind11::module & (std::string const &) > ModuleGetter; void bind_std_stl_function(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_std_functional_hash(std::function< pybind11::module &(std::string const &namespace_) > &M); +void bind_std_unordered_set(std::function< pybind11::module &(std::string const &namespace_) > &M); void bind_T42_stl_names_set(std::function< pybind11::module &(std::string const &namespace_) > &M); @@ -215,6 +271,7 @@ PYBIND11_MODULE(T42_stl_names_set, root_module) { bind_std_stl_function(M); bind_std_functional_hash(M); + bind_std_unordered_set(M); bind_T42_stl_names_set(M); } @@ -223,6 +280,7 @@ PYBIND11_MODULE(T42_stl_names_set, root_module) { // T42_stl_names_set.cpp // std/stl_function.cpp // std/functional_hash.cpp +// std/unordered_set.cpp // T42_stl_names_set.cpp // Modules list file: TEST/T42_stl_names_set.modules