Yes, this syntax is allowed; the type that it denotes is a reference to a function that takes bool and double and returns void . If we were a typedef , this would be inconvenient, because the name would be in the middle:
typedef void Signature(bool, double);
With the new syntax, the alias becomes somewhat more readable:
using Signature = void(bool, double);
A parallel with pointers to functions will be:
typedef void (*Pointer)(bool, double); using Pointer = void (*)(bool, double);
Subsequently, there are template tricks to separate the different elements (extract the return type and the type of each argument).
source share