logoalt Hacker News

1718627440yesterday at 10:45 AM1 replyview on HN

> C++ doesn't have a type for functions themselves only for function pointers

C has this, so I think C++ has as well. You can use a typedef'ed function to declare a function, not just for the function pointer.


Replies

gpderettayesterday at 1:08 PM

Same in C++. You can't do much with the function type itself as there are no objects with that type, but you can create references and pointers to it.

show 1 reply