mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
C++, fix template template parameter parsing
https://github.com/sphinx-doc/sphinx/pull/8037#issuecomment-673511490
This commit is contained in:
parent
99e36398fc
commit
d72fedb69d
1
CHANGES
1
CHANGES
@ -47,6 +47,7 @@ Bugs fixed
|
||||
class
|
||||
* #8091: autodoc: AttributeError is raised on documenting an attribute on Python
|
||||
3.5.2
|
||||
* C++, fix parsing of template template paramters, broken by the fix of #7944
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -6251,6 +6251,7 @@ class DefinitionParser(BaseParser):
|
||||
# ==========================================================================
|
||||
|
||||
def _parse_template_paramter(self) -> ASTTemplateParam:
|
||||
self.skip_ws()
|
||||
if self.skip_word('template'):
|
||||
# declare a tenplate template parameter
|
||||
nestedParams = self._parse_template_parameter_list()
|
||||
|
@ -764,6 +764,7 @@ def test_templates():
|
||||
check('class', "template<template<typename> typename> {key}A", {2: "II0E0E1A"})
|
||||
check('class', "template<template<typename> typename ...T> {key}A", {2: "II0EDpE1A"})
|
||||
check('class', "template<template<typename> typename...> {key}A", {2: "II0EDpE1A"})
|
||||
check('class', "template<typename T, template<typename> typename...> {key}A", {2: "I0I0EDpE1A"})
|
||||
|
||||
check('class', "template<int> {key}A", {2: "I_iE1A"})
|
||||
check('class', "template<int T> {key}A", {2: "I_iE1A"})
|
||||
|
Loading…
Reference in New Issue
Block a user