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: Alan Mackenzie
Subject: bug#51092: [PATCH] Recognize consteval and constinit modifiers in C++
Date: Tue, 12 Oct 2021 10:54:00 +0000

Hello, Evan and Lars.

On Fri, Oct 08, 2021 at 13:02:02 +0200, Lars Ingebrigtsen wrote:
> Evan Klitzke <evan@eklitzke.org> writes:

> > These two modifiers were introduced by C++20. The change is trivial
> > but I tested it locally on some code I have that uses these modifiers
> > and with this change the keywords are recognized as expected. I agree
> > to copyright assignment to the FSF, etc. Patch against master is
> > attached; I think this should be backported to the emacs-28 branch as
> > well.

> [...]

> > -  c++  (append '("constexpr" "explicit" "friend" "mutable" "template"
> > -            "thread_local" "virtual")
> > +  c++  (append '("consteval" "constexpr" "constinit" "explicit"
> > +            "friend" "mutable" "template" "thread_local" "virtual")

> Makes sense to me; perhaps Alan has some comments, so I've added him to
> the CCs.

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.

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. 

The copyright assignments are a bit of a hassle.  I think they've still
got to be done on paper.  But for just the patch you've proposed, an
assignment wouldn't be needed.  Richard Stallman has confirmed that the
measure is the number of lines of code added/changed, not the degree of
functionality.  Lars is probably better informed than me about this, and
Eli Zaretskii certainly is.

> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

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