Author Topic: SE23 C++ derived class prototype fn() const override  (Read 269 times)

jc44

  • Senior Community Member
  • Posts: 216
  • Hero Points: 15
SE23 C++ derived class prototype fn() const override
« on: April 30, 2019, 12:49:29 pm »
Hi

When generating a C++ derived class SE will generate prototypes for virtual methods. If the overridden method is "virtual int fn() const = 0" then the prototype generated by "Implementation here" is "int fn() override const {}" however my compiler (clang) complains "error: 'const' qualifier may not appear after the virtual specifier 'override'" - it wants "const override" rather than "override const" and I'm prepared to believe it is correct.

Thanks

John Cox

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2789
  • Hero Points: 422
Re: SE23 C++ derived class prototype fn() const override
« Reply #1 on: April 30, 2019, 03:52:21 pm »
Kind of a persnickety compiler error, but I agree that it is correct, override should be last because "const" is part of the function signature which is being overridden.  I will put in a hot fix for this.  Thanks for reporting this!