This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/68423] New: override/final doesn't cause error in templated class without base


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

            Bug ID: 68423
           Summary: override/final doesn't cause error in templated class
                    without base
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rhainin1 at binghamton dot edu
  Target Milestone: ---

The following does not produce a compile time error, though it should because
Cls doesn't ever have a base class.

template <typename>
struct Cls {
  void fun() override { }
};

nor does:

template <int>
struct Cls {
  void fun() final { }
};

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]