importing of C++ nested generics like std::vector<T>::iterator, using the apostrophe operator
This commit is contained in:
parent
6c78f1a43d
commit
1ebf1aaa80
6 changed files with 101 additions and 16 deletions
21
tests/cpp/vector_iterator.nim
Normal file
21
tests/cpp/vector_iterator.nim
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
discard """
|
||||
cmd: "nim cpp $file"
|
||||
"""
|
||||
|
||||
{.emit: """
|
||||
|
||||
template <class T>
|
||||
struct Vector {
|
||||
struct Iterator {
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
""".}
|
||||
|
||||
type
|
||||
Vector {.importcpp: "Vector".} [T] = object
|
||||
VectorIterator {.importcpp: "Vector<'2>::Iterator".} [T] = object
|
||||
|
||||
var x: VectorIterator[void]
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue