I am looking at implementing a c++ wrapper for c-based freeRtos. I found this link
Its only a short bit of code, but inside it has the following:
static void taskfun(void* parm) { static_cast(parm)->task(); : } I always thought that static_cast needs <type> after it. Can someone explain what this code is doing for me? - I feel like I am missing somthing fundamental here :o
<type>part (treated it as a HTML tag).that looks something likethis code snipped is invalid, it's just to show the right direction the code should take.I have a header file (below) that automatically builds these wrappers. Derive your class from TaskClass, and a task will be created that calls the member function task. Or, for a free-function task, create a item of type Task, and it will create the task TCB for you.". Looks like that is meant to be real code?static_cast<classname *>(parm)->memberfun().