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

            Bug ID: 84282
           Summary: [8 Regression] Probably rejected valid code
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jason at gcc dot gnu.org
  Target Milestone: ---

Starting from r253599 we reject:

$ cat chrome2.ii
class a {};
template <typename> class b {
  operator bool() { return c; }
  a c;
};

$ g++ chrome2.ii -c
chrome2.ii: In member function ‘b< <template-parameter-1-1> >::operator
bool()’:
chrome2.ii:3:28: error: cannot convert ‘a’ to ‘bool’ in return
   operator bool() { return c; }
                            ^

clang++ 5.0.1 also accepts

Reply via email to