From 0e9e21332424f73cbee10ca108b8a0a1b9afaf84 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@musicpd.org>
Date: Thu, 19 May 2022 09:46:34 +0200
Subject: [PATCH] meson.build: switch to C++20

---
 NEWS              | 2 ++
 doc/developer.rst | 2 +-
 doc/user.rst      | 2 +-
 meson.build       | 4 ++--
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index 8d90cc9c6..b641cad38 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ ver 0.24 (not yet released)
   - add option "mixramp_analyzer" to scan MixRamp tags on-the-fly
 * tags
   - new tag "Mood"
+* switch to C++20
+  - GCC 10 or clang 11 (or newer) recommended
 
 ver 0.23.8 (not yet released)
 
diff --git a/doc/developer.rst b/doc/developer.rst
index 8cbc8c3b0..14a87950f 100644
--- a/doc/developer.rst
+++ b/doc/developer.rst
@@ -12,7 +12,7 @@ Code Style
 * indent with tabs (width 8)
 * don't write CPP when you can write C++: use inline functions and constexpr instead of macros
 * comment your code, document your APIs
-* the code should be C++17 compliant, and must compile with :program:`GCC` 8 and :program:`clang` 5
+* the code should be C++20 compliant, and must compile with :program:`GCC` 10 and :program:`clang` 11
 * all code must be exception-safe
 * classes and functions names use CamelCase; variables are lower-case with words separated by underscore
 
diff --git a/doc/user.rst b/doc/user.rst
index 1dbb148cc..b9143b6bc 100644
--- a/doc/user.rst
+++ b/doc/user.rst
@@ -55,7 +55,7 @@ and unpack it (or `clone the git repository
 
 In any case, you need:
 
-* a C++17 compiler (e.g. GCC 8 or clang 7)
+* a C++20 compiler (e.g. GCC 10 or clang 11)
 * `Meson 0.56.0 <http://mesonbuild.com/>`__ and `Ninja
   <https://ninja-build.org/>`__
 * Boost 1.58
diff --git a/meson.build b/meson.build
index ba650c428..f391f5789 100644
--- a/meson.build
+++ b/meson.build
@@ -6,8 +6,8 @@ project(
   default_options: [
     'c_std=c11',
     'build.c_std=c11',
-    'cpp_std=c++17',
-    'build.cpp_std=c++17',
+    'cpp_std=c++2a',
+    'build.cpp_std=c++2a',
     'warning_level=3',
 
     # If we build those libraries as Meson subproject, they shall be