Does V8 now allow C++20?

226 views
Skip to first unread message

Ho Cheung

unread,
Jun 18, 2024, 10:56:25 AM6/18/24
to v8-dev
I am planning to make some C++20 related contributions to V8. Is V8 allowed to use C++20 now?

Ronald Fenner

unread,
Jun 18, 2024, 4:44:21 PM6/18/24
to v8-dev
They probably use what chromium uses and I've seen a concept used in the gin framework which is a c++20 feature so they probably do but they can confirm for sure.

Clemens Backes

unread,
Jun 19, 2024, 4:44:30 AM6/19/24
to v8-...@googlegroups.com
Yes, V8 allows the use of C++ language and library features since ~two weeks (https://crrev.com/c/5587859). Note though that GCC and MSVC do not always agree with clang on what's valid C++20. See Hannes' mails on reducing support for those compilers.

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/5f260625-0647-4ddd-a0c3-fe063deb3b41n%40googlegroups.com.


--

Clemens Backes

Software Engineer

clem...@google.com

Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Liana Sebastian   

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.


This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.


Ho Cheung

unread,
Jun 19, 2024, 5:20:53 AM6/19/24
to v8-...@googlegroups.com

OK thanks


You received this message because you are subscribed to a topic in the Google Groups "v8-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-dev/rNPd4IRp_YM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAGO%3DqhCWsa9B9UXiNrp%3Dbsa_hcJUSow2f0mhfGMtbUSaXsJCTA%40mail.gmail.com.

James Dennett

unread,
Apr 10, 2026, 3:16:21 AM (7 days ago) Apr 10
to v8-dev
Now that Chromium allows (some) use of C++23 features, is there a plan/policy/path to doing the same in V8?  Is this documented anywhere?  (My Google-fu has failed me, if so.)

Given that this is something of a balancing act between the benefit to V8 developers and the needs of V8 integrators ("users"), is this decision made in approximately the same way for each C++ update?  Would it be a reasonable approximation to guess that V8 might break C++20 compatibility around three years after requiring it (and breaking C++17 compatibility), which would put this around June 2027, or is there a realistic chance that it might happen much faster for C++23 than for C++20?

-- James

Jakob Kummerow

unread,
Apr 10, 2026, 5:18:34 AM (7 days ago) Apr 10
to v8-...@googlegroups.com
I don't think there's a timeline for C++23 in V8 yet. For the time being, V8 is still on C++20.

I wouldn't expect that the schedule necessarily matches previous C++ version rollouts. New C++ versions are relatively infrequent and each is different, so it's a case-by-case decision, driven by factors such as: 
- Does the new C++ version offer anything that we'd want to use?
- Does switching require any extra work, and when can we prioritize that work?
- Are there any blocking concerns from embedders?

We are well aware of the balancing act. Right now for C++23, I think we want to give embedders a bit more time, but I don't know how much time that might be.

Is there a particular reason for your question?

James Dennett

unread,
Apr 10, 2026, 1:21:25 PM (7 days ago) Apr 10
to v8-...@googlegroups.com
On Fri, Apr 10, 2026 at 2:18 AM Jakob Kummerow <jkum...@chromium.org> wrote:
I don't think there's a timeline for C++23 in V8 yet. For the time being, V8 is still on C++20.

I wouldn't expect that the schedule necessarily matches previous C++ version rollouts. New C++ versions are relatively infrequent and each is different, so it's a case-by-case decision, driven by factors such as: 
- Does the new C++ version offer anything that we'd want to use?
- Does switching require any extra work, and when can we prioritize that work?
- Are there any blocking concerns from embedders?

We are well aware of the balancing act.

I had assumed as much, yes!
 
Right now for C++23, I think we want to give embedders a bit more time, but I don't know how much time that might be.

Is there a particular reason for your question?

Beyond curiosity, this is useful for planning as an embedder of V8 and a potential contributor to the V8 codebase.

As an embedder of V8, we need to ensure that we have C++23-compatible builds of other dependencies (including other open source projects) before V8 makes it a hard requirement, as well as updates to tools, policies, etc. as are always needed for C++ version updates.  We may need to contribute patches to other libraries for C++23 compatibility, depending on the timeline.

-- James

Reply all
Reply to author
Forward
0 new messages