I think you must have made something wrong. First, in C++, the function pf accepts two strings and then returns a function pointer (important: it is not a closure). This new function accepts two more strings and returns bool. This kind of function is almost meaningless unless the purpose of the two strings is to find a function to return.
Generally speaking, tailing return types is used to use decltype, or simply to make the code more readable. For example, the pf above has another way of writing:
I think you must have made something wrong. First, in C++, the function pf accepts two strings and then returns a function pointer (important: it is not a closure). This new function accepts two more strings and returns bool. This kind of function is almost meaningless unless the purpose of the two strings is to find a function to return.
Generally speaking, tailing return types is used to use decltype, or simply to make the code more readable. For example, the pf above has another way of writing:
An example of decltype is as follows. For example, you may not know what type a+b returns:
In this way you can not only Add(1, 2), but also Add(3.0, 4.0f), and even Add("VczhIsAGenius", 7).
Finally, if you say how to use such a PF, it must be similar to the following writing:
I suggest you re-examine your question.