The following code is rejected if compiled with gcc 4.9.0 20130505 (experimental) using the flags
-std=c++11 -Wall -pedantic-errors
//------------------------------------ typedef void fc1() const; // OK typedef void frr1() &&; // OK typedef void fcr1() const &; using fc2 = void() const; // #4 using frr2 = void() &&; // OK using fcr2 = void() const &; // #6 //------------------------------------
"main.cpp|4|error: invalid qualifiers on non-member function type| main.cpp|6|error: invalid qualifiers on non-member function type|"
According to 8.3.5 [dcl.fct] p6 function type declarations with cv-qualifiers are valid via alias-declarations (b3).
The following code is rejected if compiled with gcc 4.9.0 20130505 (experimental) using the flags
-std=c++11 -Wall -pedantic-errors
//----- ------- ------- ------- ------- --- ------- ------- ------- ------- ---
typedef void fc1() const; // OK
typedef void frr1() &&; // OK
typedef void fcr1() const &;
using fc2 = void() const; // #4
using frr2 = void() &&; // OK
using fcr2 = void() const &; // #6
//-----
"main.cpp|4|error: invalid qualifiers on non-member function type|
main.cpp|6|error: invalid qualifiers on non-member function type|"
According to 8.3.5 [dcl.fct] p6 function type declarations with cv-qualifiers are valid via alias-declarations (b3).