Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
a9699f74
Commit
a9699f74
authored
Nov 05, 2020
by
Ashwin Srinath
Committed by
Stefan Behnel
Nov 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow const declarations in nested template arguments (GH-3886)
Closes
https://github.com/cython/cython/issues/1355
parent
58955604
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+1
-1
tests/compile/cpp_templates_nested.pyx
tests/compile/cpp_templates_nested.pyx
+18
-0
No files found.
Cython/Compiler/Parsing.py
View file @
a9699f74
...
...
@@ -2678,7 +2678,7 @@ def looking_at_expr(s):
s
.
put_back
(
*
saved
)
elif
s
.
sy
==
'['
:
s
.
next
()
is_type
=
s
.
sy
==
']'
is_type
=
s
.
sy
==
']'
or
not
looking_at_expr
(
s
)
# could be a nested template type
s
.
put_back
(
*
saved
)
dotted_path
.
reverse
()
...
...
tests/compile/cpp_templates_nested.pyx
0 → 100644
View file @
a9699f74
# tag: cpp
# mode: compile
from
libcpp.vector
cimport
vector
cdef
extern
from
*
:
cdef
cppclass
Foo
[
T
]:
pass
cdef
cppclass
Bar
:
pass
cdef
vector
[
vector
[
int
]]
a
cdef
vector
[
vector
[
const
int
]]
b
cdef
vector
[
vector
[
vector
[
int
]]]
c
cdef
vector
[
vector
[
vector
[
const
int
]]]
d
cdef
Foo
[
Foo
[
Bar
]]
e
cdef
Foo
[
Foo
[
const
Bar
]]
f
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment