GetSubsystem<Input>()
Check out:
https://github.com/onionhammer/clibpp
I believe the author wraps a templated method in their example
Interesting. How do other more advanced C++ template features map to Nim's generics/templates/macros? C++ has variadic templates, template template parameters, and templates parameterized by constants. What are the idiomatic ways to handle those kinds of things in Nim?
I suppose that user defined typeclasses will be the way to handle concepts (which aren't in C++ yet) but I'm curious about the others.
gradha: Thank you but, I'm not asking for replacing the functionality in Nimrod but rather to translate GetSubsystem(subsystem) to GetSubsystem<subsystem>() when compiled to C++
will: That is not in the example, but rather in the test, however there's no way (or at least I failed to fint it out) to do that.
brianrogoff: That's an interesting question, but on forums it's better to keep a theme/question per post, that question it's better suited for another post, or maybe other ways of communication (reddit, irc ...)
proc getInputSubsystem() {.importc: "GetSubsystem<Input>", header: "foo.hpp".}