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

            Bug ID: 63871
           Summary: -Weffc++ does not understand type deduction for return
                    types
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: david at doublewise dot net

Source file:


class C {};
auto && operator++(C & c) {
    return c;
}

int main() {
}



gcc-4.9 source/main.cpp -Weffc++ -std=c++1y
source/main.cpp:112:25: warning: prefix ‘auto&& operator++(C&)’ should return
‘C&’ [-Weffc++]
 auto && operator++(C & c) {



I get the same error with the return type specified as `auto &` or
`decltype(auto)`.

Reply via email to