Package: python-sphinx Version: 1.1.3+dfsg-4 Severity: normal Tags: patch Dear Maintainer,
The following three commands show that sphinx fails to parse a "static constexpr" function declaration: % cat >config.py <<EOF source_suffix = '.rst' master_doc = 'index' EOF % cat >index.rst <<EOF ... default-domain:: cpp ... function:: static constexpr bool foo() bar EOF % sphinx-build -a . out Running Sphinx v1.1.3 loading pickled environment... done No builder selected, using default: html building [html]: all source files updating environment: 0 added, 1 changed, 0 removed reading sources... [100%] index /home/adl/tmp/index.rst:3: WARNING: Invalid definition: expected parentheses for function [error at 22] static constexpr bool foo() looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index writing additional files... genindex search copying static files... done dumping search index... done dumping object inventory... done build succeeded, 1 warning. domains/cpp.py has all the bits required to parse "static" or "constexpr" function declarations, but it fails to parse the two together. Apparently, this is because the space after "static" is not removed. I patched my system as follows: % diff -u /usr/share/pyshared/sphinx/domains/cpp.py{.old,} --- /usr/share/pyshared/sphinx/domains/cpp.py.old 2012-11-12 15:19:46.325645389 +0100 +++ /usr/share/pyshared/sphinx/domains/cpp.py 2012-11-12 15:21:04.090030981 +0100 @@ -836,7 +836,7 @@ 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): -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 3.2.0-3-686-pae (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python-sphinx depends on: ii python 2.7.3-3 ii python-docutils 0.8.1-8 ii python-jinja2 2.6-1 ii python-pygments 1.5+dfsg-1 ii python-support 1.0.15 ii sphinx-common 1.1.3+dfsg-4 Versions of packages python-sphinx recommends: ii python 2.7.3-3 ii python-imaging 1.1.7-4 ii python-simplejson 2.6.2-1 pn sphinx-doc <none> Versions of packages python-sphinx suggests: ii jsmath 3.6c-1.1 pn libjs-mathjax <none> ii texlive-fonts-recommended 2012.20120611-5 ii texlive-latex-extra 2012.20120611-2 ii texlive-latex-recommended 2012.20120611-5 -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org