importing of C++ nested generics like std::vector<T>::iterator, using the apostrophe operator

This commit is contained in:
Zahary Karadjov
2015-04-13 23:49:41 +03:00
parent 6c78f1a43d
commit 1ebf1aaa80
6 changed files with 101 additions and 16 deletions

View 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]