bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51092: [PATCH] Recognize consteval and constinit modifiers in C++


From: Evan Klitzke
Subject: bug#51092: [PATCH] Recognize consteval and constinit modifiers in C++
Date: Thu, 14 Oct 2021 14:22:22 -0400

On Tue, Oct 12, 2021 at 6:54 AM Alan Mackenzie <acm@muc.de> wrote:
> As the maintainer of CC Mode, i'm in two minds over this.  It's clearly
> a step in the right direction.  But there's a non-trivial amount of work
> to be done to implement C++20's new features, and having just those few
> new keywords and nothing else in the release branch might jar.

It doesn't necessarily have to be in the release branch, I just
thought it would be nice since it's such a small change. But I'm not
too familiar with the branching process of Emacs or how much work that
is.

> Evan, you've clearly burrowed a fair way into CC Mode, and have some
> idea of how complicated it is.  Do you perhaps feel able and willing to
> add a larger part of C++20's new feature set to CC Mode?  Regular
> discussion and help from me would, of course, be available.  I envisage
> starting off in the CC Mode standalone project, and transferring the new
> features steadily to the Emacs master branch as they become ready; this
> has been my standard way of working for many years.  The standalone
> project is at SourceForge, and uses Mercurial (which is easy to learn)
> rather than git.

I'm far from an expert at elisp but I'm happy to review and test
changes to cc mode, and discuss them. I did look through some other
parts of the cc mode code and it is pretty daunting. I don't mind
working with sourceforge or mercurial.

I'm curious, do you have an idea of what other C++20 features need
more support in cc mode? One thing I did notice when making this
change is that some modifiers in C++ should only apply to variable
declarations (e.g. mutable, thread_local, constinit), some apply only
to function declarations (e.g. virtual, consteval), and some can apply
to either (e.g. constexpr), and currently the cc mode code doesn't
distinguish between these cases. But this isn't exactly a C++20 thing,
since it applies to many of the existing keywords.

-- 
evan klitzke
https://eklitzke.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]