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 351 of file semantics.py.
353 Return an iterator over the list of template arguments in a C++ type
356 >>> t = 'map<string, vector<int, allocator<int> >, allocator<v<i>, a<i>> >'
357 >>> list(extract_template_args(t))
358 ['string', 'vector<int, allocator<int> >', 'allocator<v<i>, a<i>>']
359 >>> list(extract_template_args('int'))
364 for p, c
in enumerate(cpp_type):
366 if template_level == 1:
367 yield cpp_type[arg_start:p].strip()
371 if template_level == 1:
375 if template_level == 0:
376 yield cpp_type[arg_start:p].strip()