#37 [Feature request] C++11 keywords highlighting

None
fixed
orwelldevcpp
None
2013-09-29
2012-11-01
Vasily Biryukov
No

Some C++ keywords not highlighted in the editor.
The C++11 keywords: 'alignas', 'alignof', 'char16_t', 'char32_t', 'constexpr', 'decltype', 'noexcept', 'nullptr', 'static_assert', 'thread_local'.
And the C++03 keyword 'export' (it's not used really, but it's reserved as a keyword).

Discussion

  • Hazardy
    Hazardy
    2012-11-01

    Don't forget override and final if used behind the method declaration.

     
  • orwelldevcpp
    orwelldevcpp
    2012-11-01

    I'll consider adding all C++ keywords, up to and including C++11.

    Do you think this is a good reference: http://en.cppreference.com/w/cpp/keyword ?

     
    Last edit: orwelldevcpp 2012-11-01
  • Do you think this is a good reference: http://en.cppreference.com/w/cpp/keyword ?

    Yes, it's good enough.

    Note that 'override' it is contextual keyword and only meaningful after the member function declaration:

    class base
    {
    public:
        virtual void f();
    };
    
    class derived : public base
    {
    public:
        void f() override;
    };
    

    The 'final' works just like 'override', but can also be used after the class name in a class declaration:

    class  test1 final {};
    struct test2 final {};
    union  test3 final {};
    

    In other contexts 'final' and 'override' are not keywords.

     
    Last edit: Vasily Biryukov 2012-11-01
  • orwelldevcpp
    orwelldevcpp
    2012-11-01

    • summary: [Feqture request] C++11 keywords highlighting --> [Feature request] C++11 keywords highlighting
    • milestone: -->
     
  • orwelldevcpp
    orwelldevcpp
    2012-11-01

    I'll probably add those keywords to 5.3.0.3 (expect it in about 8-9 days), but I'm afraid it will be a hell of a job making the highlighting so context sensitive for override and final. The highlighter has limited parsing capabilities, so getting that stuff to work would be out of my reach (I'd have to completely rewrite the highlighter).

     
  • orwelldevcpp
    orwelldevcpp
    2013-09-29

    • status: open --> fixed
    • assigned_to: orwelldevcpp
     
  • orwelldevcpp
    orwelldevcpp
    2013-09-29

    Added all context insensitive keywords from said link.

    That took a while.