[Bug c++/66150] New: [C++11] cv-qualifiers on function types are not ignored.

eric at efcs dot ca gcc-bugzilla@gcc.gnu.org
Thu May 14 20:02:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66150

            Bug ID: 66150
           Summary: [C++11] cv-qualifiers on function types are not
                    ignored.
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric at efcs dot ca
  Target Milestone: ---

Currently GCC does not ignore cv-qualifiers applied to a function type.

Example:

typedef void T();
static_assert(std::is_same<T, T const>::value, "");

According to the C++11 standard:
[dcl.fct]p7:
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.



More information about the Gcc-bugs mailing list