[Bug c++/105699] New: [Concepts] Constrained virtual functions are accepted by GCC

roi.jacobson1 at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon May 23 07:59:54 GMT 2022


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

            Bug ID: 105699
           Summary: [Concepts] Constrained virtual functions are accepted
                    by GCC
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: roi.jacobson1 at gmail dot com
  Target Milestone: ---

[class.virtual]p6 says virtual functions shall not be constrained. This example
from the standard is accepted in GCC:

template<typename T>
struct A {
  virtual void f() requires true; // Standard says is an error
};

Is this intentional?


More information about the Gcc-bugs mailing list