The getSubsystem<T> example in the manual currently fails with a codegen error
A faulty proc declaration is generated: N_NIMCALL(System::Input*, SystemManager::getSubsystem<'*0>())(void); The manual has been edited to add a nodecl pragma, which alleviates the issue Fix a typo in the vector_iterator example from the previous commit.
This commit is contained in:
parent
1ebf1aaa80
commit
6fb372d96b
3 changed files with 25 additions and 5 deletions
|
|
@ -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]()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue