The issue rises up with C++0x's decltype and rvalue references:

int const f() { return 0; }

int &&r = f(); // binding "int&&" to "int" should succeed
decltype(0, f()) i; // "i" should get type "int", not "int const". 

In C++, non-class type are not cv-qualified.


-- 
           Summary: GCC wrongly treats rvalues of non-class type cv-
                    qualified
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schaub-johannes at web dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41815

Reply via email to