SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: jc44 on April 30, 2019, 12:49:29 PM

Title: SE23 C++ derived class prototype fn() const override
Post by: jc44 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
Title: Re: SE23 C++ derived class prototype fn() const override
Post by: Dennis 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!