Return an iterator over the list of template arguments in a C++ type
string.
>>> t = 'map<string, vector<int, allocator<int> >, allocator<v<i>, a<i>> >'
>>> list(extract_template_args(t))
['string', 'vector<int, allocator<int> >', 'allocator<v<i>, a<i>>']
>>> list(extract_template_args('int'))
[]
Definition at line 270 of file semantics.py.
272 Return an iterator over the list of template arguments in a C++ type
275 >>> t = 'map<string, vector<int, allocator<int> >, allocator<v<i>, a<i>> >'
276 >>> list(extract_template_args(t))
277 ['string', 'vector<int, allocator<int> >', 'allocator<v<i>, a<i>>']
278 >>> list(extract_template_args('int'))
283 for p, c
in enumerate(cpp_type):
285 if template_level == 1:
286 yield cpp_type[arg_start:p].strip()
290 if template_level == 1:
294 if template_level == 0:
295 yield cpp_type[arg_start:p].strip()