Menu

#43 Code complete - keyword final

Next_Release
open
nobody
Feature_Request
2020-08-17
2014-09-06
No

Key word final breaks auto complete, example:

namespace ns
{
  class Foo {};
  class Bar final : public Foo {};
}

int main()
{
  /// \bug Code completion shows Foo and final, not Bar.
  /// ns::Foo + ns::Bar are expected to pop up.

  return 0;
}

I only tested in 13.12 linux mint, I don't have acces to annything else for comming weeks.

Discussion

  • ollydbg

    ollydbg - 2014-09-08

    This is a C++11 feature, and as far as I can see, we can simply skip the "final" keyword. But what if a user don't use C++11 feature, and "final" may be a normal variable name in their code?

    Note that C++11's grammar is too complex, and our build-in parser don't handle them correctly. (especially the template related code).

     
  • ollydbg

    ollydbg - 2014-09-08

    For a workaround, you can simply add a user replacement rule that "final" to empty string, so the "final" will be skipped in the Tokenizer.

     
    • Dimitry Sibiryakov

      This trick seems not to work in modern versions. No replacements' window in settings and direct edit of default.conf has no effect.

       
  • Morten MacFly

    Morten MacFly - 2015-02-07
    • Type: --> Undefined
     
  • Teodor Petrov

    Teodor Petrov - 2016-01-21
    • labels: --> CodeCompletion
    • Type: Undefined --> Feature_Request
     

Log in to post a comment.

MongoDB Logo MongoDB