summary refs log tree commit diff stats
path: root/tests/cpp
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2015-04-13 23:49:41 +0300
committerZahary Karadjov <zahary@gmail.com>2015-04-13 23:49:41 +0300
commit1ebf1aaa80664bfb19ca09845d4258fe6dff25df (patch)
tree397c33c3c0c9c9b110d3bcd93819212c0075aa09 /tests/cpp
parent6c78f1a43d256c7d5e936d87946ae0edf35ddecb (diff)
downloadNim-1ebf1aaa80664bfb19ca09845d4258fe6dff25df.tar.gz
importing of C++ nested generics like std::vector<T>::iterator, using the apostrophe operator
Diffstat (limited to 'tests/cpp')
-rw-r--r--tests/cpp/vector_iterator.nim21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/cpp/vector_iterator.nim b/tests/cpp/vector_iterator.nim
new file mode 100644
index 000000000..bd26db351
--- /dev/null
+++ b/tests/cpp/vector_iterator.nim
@@ -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]
+