I understand that this is most likely not what you need ... but it still answers your question as it is currently worded:
void someFunction() { void (*self)() = someFunction; }
(Of course, here you can precisely use the identifier someFunction directly in most cases, instead of the function pointer self .)
If, however, you are looking for a way to do the same when you donβt know what the current function is called (how could you ever get into this situation, I wonder?), Then I donβt know the standard one that can transfer this method.
stakx source share