| RFC-0283: Add support for C++23 ||
|---|---|
| Status | Accepted |
| Areas | - Languages and Libraries - Toolchain |
| Description | Update the Fuchsia tree C++ version to C++23 and expand supported SDK C++ versions to include C++23 |
| Issues | - [459923005](https://fxbug.dev/459923005) |
| Gerrit change | - [1546603](https://fuchsia-review.googlesource.com/c/fuchsia/+/1546603) |
| Authors | - [ianloic@google.com](https://fuchsia-review.googlesource.com/q/owner:ianloic@google.com) |
| Reviewers | - [mcgrathr@google.com](https://fuchsia-review.googlesource.com/q/owner:mcgrathr@google.com) - [phosek@google.com](https://fuchsia-review.googlesource.com/q/owner:phosek@google.com) |
| Date submitted (year-month-day) | 2026-03-19 |
| Date reviewed (year-month-day) | 2026-05-05 |

[Edit this RFC](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/contribute/governance/rfcs/0283_add_support_for_c++23.md)
[Edit RFC metadata](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/contribute/governance/rfcs/_rfcs.yaml&searchAndJump=-+name:+'RFC-0283')

## Summary

Following the process outlined in [RFC-0193: Supported C++ Versions](https://fuchsia.dev/docs/contribute/governance/rfcs/0193_supported_c++_versions),
this RFC proposes updating from C++20 to C++23 as the Fuchsia tree C++ version
and expanding the set of formally supported C++ versions in the SDK to include
C++23.

## Motivation

C++20 is the only supported version in the Fuchsia platform, while the SDK
supports both C++17 and C++20 according to
[RFC-0193: Supported C++ Versions](https://fuchsia.dev/docs/contribute/governance/rfcs/0193_supported_c++_versions) and
[RFC-0258: Update from C++17 to C++20](https://fuchsia.dev/docs/contribute/governance/rfcs/0258_update_from_c++17_to_c++20). C++23 introduces a number of
new features that significantly improve the ergonomics, but these improvements
are currently unavailable to Fuchsia platform developers.

## Stakeholders

*Facilitator:*

- leannogasawara@google.com

*Reviewers:*

- mcgrathr@google.com
- phosek@google.com

*Consulted:*

*Socialization:*

## Requirements

- Update the Fuchsia tree C++ version from C++20 to C++23.
- Allow in-tree platform code to rely on C++23 features.

### Non-goals

- Make every feature in the C++23 standard immediately available in Fuchsia.

## Design

The Fuchsia tree can be already compiled in either C++20 or C++23 modes. This
will change the C++ version used by the Fuchsia tree from C++20 to C++23 after
which it will no longer be an option to build in-tree (or "platform") code in
the C++20 mode.

## Implementation

The C++ standard used by the Fuchsia tree is controlled by a build argument. We
plan to submit a change that updates the Fuchsia tree C++ version from
C++20 to C++23, but ask Fuchsia developers to avoid using C++23 features until
the RFC is approved, to preserve the ability to roll back to C++20 if needed.

## Performance

N/A

## Ergonomics

Access to all C++23 standard library features will reduce boilerplate
and improve the C++ language usability.

## Backwards Compatibility

Both C++17 and C++20 MUST remain supported in the SDK. The in-tree (or
"platform") code which is not part of the SDK API surface can start relying on
C++23 features and thus become incompatible with C++17 and C++20.

## Security considerations

N/A

## Privacy considerations

N/A

## Testing

In accordance with [RFC-0193](https://fuchsia.dev/docs/contribute/governance/rfcs/0193_supported_c++_versions), the SDK tests will be built and run in
every supported C++ version, now including C++23.

## Documentation

The [SDK documentation](https://fuchsia.dev/docs/development/idk/documentation/compilation) will be updated to reflect that C++23 is
officially supported in addition to C++17 and C++20; we will also document the
constraints on C++23 feature support available to the SDK users.

[C++ in Zircon](https://fuchsia.dev/docs/development/languages/c-cpp/cxx) will be updated to cover supported C++23
features and constraints on their use.

## Drawbacks, alternatives, and unknowns

## Prior art and references

[](https://issues.fuchsia.dev/issues/new?component=1439230&template=1881640&description=Issue+on:+https://fuchsia.dev/docs/contribute/governance/rfcs/0283_add_support_for_c++23.md "Report a bug or suggest improvements on this page") [](https://cs.opensource.google/fuchsia/fuchsia/+/main:docs/contribute/governance/rfcs/0283_add_support_for_c++23.md "View the source code of this page") [](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/contribute/governance/rfcs/0283_add_support_for_c++23.md&cloneRepo=fuchsia/fuchsia:refs/heads/main&fullPath=fuchsia/docs/contribute/governance/rfcs/0283_add_support_for_c++23.md "Edit the source code of this page")