mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
fix: cpp domain parser cannot parse 'static constexpr' declarations. closes #1038
This commit is contained in:
parent
4e715ff0bf
commit
f24b1998f2
@ -852,7 +852,7 @@ class DefinitionParser(object):
|
||||
visibility = 'public'
|
||||
if self.match(_visibility_re):
|
||||
visibility = self.matched_text
|
||||
static = self.skip_word('static')
|
||||
static = self.skip_word_and_ws('static')
|
||||
return visibility, static
|
||||
|
||||
def parse_type(self):
|
||||
|
@ -60,6 +60,9 @@ def test_type_definitions():
|
||||
x = 'constexpr int get_value()'
|
||||
assert unicode(parse('function', x)) == x
|
||||
|
||||
x = 'static constexpr int get_value()'
|
||||
assert unicode(parse('function', x)) == x
|
||||
|
||||
x = 'int get_value() const noexcept'
|
||||
assert unicode(parse('function', x)) == x
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user