0

it is possible to declare array of function pointer

typedef void (*action_pointers[])();

but how declare array of function by ref? I have use multiple try around below example but not found any solution.

typedef void (&action_pointers[])();
  • https://stackoverflow.com/questions/1164266/why-are-arrays-of-references-illegal – Muhammet Ali Asan Nov 20 '20 at 17:28
  • You can't create an array of references. But, you can create an array of [`std::reference_wrapper`](https://en.cppreference.com/w/cpp/utility/functional/reference_wrapper) instead. – Remy Lebeau Nov 20 '20 at 17:30

0 Answers0