For instance, is there any legal equivalent to this?
typedef void (*SelfReferencingFnPtr)(int, SelfReferencingFnPtr);
With clang, this causes the error "unknown name SelfReferencingFnPtr".
The best I was able to come up with is a functor whose operator()
accepts its own type.
No, see GotW #57. It's indeed a recursive problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With