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

            Bug ID: 115216
           Summary: operator auto() gets instantiatied too eagerly
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olaf.krzikalla at dlr dot de
  Target Milestone: ---

Full example in:

https://godbolt.org/z/3hG5fh1PW

The example can be compiled either by commenting out line 24 or by swapping in
line 8 for line 9. In any case line 25 works. Thus there is a difference
between
the terms "xx[1]" and "xx.operator[](1)".

The error occurs with all recent gcc versions. It doesn't occur with any clang
version.

Reply via email to