summary refs log tree commit diff stats
path: root/doc/nimc.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/nimc.txt')
-rw-r--r--doc/nimc.txt21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/nimc.txt b/doc/nimc.txt
index 831fce567..cfbccc479 100644
--- a/doc/nimc.txt
+++ b/doc/nimc.txt
@@ -506,7 +506,7 @@ For example:
 .. code-block:: nim
 
   type Input {.importcpp: "System::Input".} = object
-  proc getSubsystem*[T](): ptr T {.importcpp: "SystemManager::getSubsystem<'*0>()".}
+  proc getSubsystem*[T](): ptr T {.importcpp: "SystemManager::getSubsystem<'*0>()", nodecl.}
 
   let x: ptr Input = getSubsystem[Input]()
 
@@ -596,6 +596,25 @@ Produces:
   x[6] = 91.4;
 
 
+- If more precise control is needed, the apostrophe ``'`` can be used in the
+  supplied pattern to denote the concrete type parameters of the generic type.
+  See the usage of the apostrophe operator in proc patterns for more details.
+
+.. code-block:: nim
+
+  type
+    VectorIterator {.importcpp: "std::vector<'0>::iterator".} [T] = object
+
+  var x: VectorIterator[cint]
+
+
+Produces:
+
+.. code-block:: C
+  
+  std::vector<int>::iterator x;
+
+
 ImportObjC pragma
 -----------------
 Similar to the `importc pragma for C <manual.html#importc-pragma>`_, the