{"action":"closed","issue":{"url":"https://api.github.com/repos/TRIQS/triqs/issues/196","labels_url":"https://api.github.com/repos/TRIQS/triqs/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/TRIQS/triqs/issues/196/comments","events_url":"https://api.github.com/repos/TRIQS/triqs/issues/196/events","html_url":"https://github.com/TRIQS/triqs/issues/196","id":57343039,"number":196,"title":"[c++2py] Some needed converter headers may be missing for a generated *_desc.py","user":{"login":"krivenko","id":1328321,"avatar_url":"https://avatars.githubusercontent.com/u/1328321?v=3","gravatar_id":"","url":"https://api.github.com/users/krivenko","html_url":"https://github.com/krivenko","followers_url":"https://api.github.com/users/krivenko/followers","following_url":"https://api.github.com/users/krivenko/following{/other_user}","gists_url":"https://api.github.com/users/krivenko/gists{/gist_id}","starred_url":"https://api.github.com/users/krivenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krivenko/subscriptions","organizations_url":"https://api.github.com/users/krivenko/orgs","repos_url":"https://api.github.com/users/krivenko/repos","events_url":"https://api.github.com/users/krivenko/events{/privacy}","received_events_url":"https://api.github.com/users/krivenko/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"parcollet","id":1014945,"avatar_url":"https://avatars.githubusercontent.com/u/1014945?v=3","gravatar_id":"","url":"https://api.github.com/users/parcollet","html_url":"https://github.com/parcollet","followers_url":"https://api.github.com/users/parcollet/followers","following_url":"https://api.github.com/users/parcollet/following{/other_user}","gists_url":"https://api.github.com/users/parcollet/gists{/gist_id}","starred_url":"https://api.github.com/users/parcollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parcollet/subscriptions","organizations_url":"https://api.github.com/users/parcollet/orgs","repos_url":"https://api.github.com/users/parcollet/repos","events_url":"https://api.github.com/users/parcollet/events{/privacy}","received_events_url":"https://api.github.com/users/parcollet/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-02-11T16:51:33Z","updated_at":"2015-02-14T09:59:16Z","closed_at":"2015-02-14T09:59:16Z","body":"Dear developers,\r\n\r\nThere is a problem with the preamble section of the description files generated by `wrapper_desc_generator.py`. A converter inclusion statement is not generated, if the corresponding type is only met as a template parameter of another type.\r\n\r\nThis simple c++ source file\r\n```c++\r\n#include<utility>\r\n#include<vector>\r\n\r\nvoid my_func(std::vector<std::pair<int,int> > const& v) {}\r\n```\r\nresults in this desc-file:\r\n```Python\r\n# Generated automatically using the command : \r\n# wrapper_desc_generator.py issue196.hpp -p -mpytriqs.issue196 -o issue196 --moduledoc \"Issue #196\"\r\nfrom wrap_generator import *\r\n\r\n# The module\r\nmodule = module_(full_name = \"pytriqs.issue196\", doc = \"Issue #196\")\r\n\r\n# All the triqs C++/Python modules\r\n\r\n# Add here all includes beyond what is automatically included by the triqs modules\r\nmodule.add_include(\"issue196.hpp\")\r\n\r\n# Add here anything to add in the C++ code at the start, e.g. namespace using\r\nmodule.add_preamble(\"\"\"\r\n#include <triqs/python_tools/converters/vector.hpp>\r\n\"\"\")\r\nmodule.add_function (\"void my_func (std::vector<std::pair<int,int>> v)\", doc = \"\")\r\n\r\nmodule.generate_code()\r\n```\r\nAs you can see, `triqs/python_tools/converters/vector.hpp` is included, while `triqs/python_tools/converters/pair.hpp` is not. If I define another C++ function, whose immediate argument is `std::pair<int,int>`, the converter for `std::pair` is also included. "}}