Your code is ill-formed with regard to C++03. You can not ever construct a const (or volatile) qualified function type. Whenever you do, your program becomes ill-formed.
This rule has been changed for C++1x, to make the compiler ignore the const
/ volatile
. C++ compilers will usually already implement this rule even in C++03 mode. Thus, the following two will define the same function twice, and results in a compilation error.
typedef void Ft();
void f(Ft const*) { }
void f(Ft *) { } // another definition!
Here is the proof of my claim. C++03, 8.3.5/1
A cv-qualifier-seq shall only be part of the function type for a nonstatic member function, the function type to which a pointer to member refers, or the top-level function type of a function typedef declaration. The effect of a cv-qualifier-seq in a function declarator is not the same as adding cv-qualification on top of the function type, i.e., it does not create a cv-qualified function type. In fact, if at any time in the determination of a type a cv-qualified function type is formed, the program is ill-formed.
Here is that text for C++1x, 8.3.5/7
n2914:
A cv-qualifier-seq shall only be part of the function type for a non-static member function, the function type to which a pointer to member refers, or the top-level function type of a function typedef declaration. The effect of a cv-qualifier-seq in a function declarator is not the same as adding cv-qualification on top of the function type. In the latter case, the cv-qualifiers are ignored.
The above says that the below is valid, though, and creates the function type for a function that can declare a const member function.
typedef void Ft() const;
struct X { Ft cMemFn; };
void X::cMemFn() const { }