-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Milestone
Description
(Previous discussion (C++17): #16684)
With package managers shipping newer versions of compilers and older releases of operating systems going EOL, it occurs that at some point in the future it will be almost uncontroversial to switch to C++20.
See the new features here: https://en.cppreference.com/w/cpp/compiler_support#cpp20
I think noteworthy are:
Lambdas in unevaluated contexts: It will be possible to use(Already fixed by util/check: Don't use a lambda for Assert/Assume #24714 )Assert(...)
(a lambda) inside another lambda.Designated initializers: Named arguments for constructors, see also Add syscall sandboxing using seccomp-bpf (Linux secure computing mode) #20487 (comment)(Already fixed by Use designated initializers #24531)- std::span: Replacing our
Span
, see also c++20: Opt-in to modeling view and borrowed_range for Span #23226 Epoch for std::chrono: Being able to removeChronoSanityCheck
from util: remove Boost posix_time usage from GetTime* #21110Remove gmtime, refactor: Replace GetTimeMicros by SystemClock #27233 (comment)Some better deduction guides (e.g.Line 18 in 16d698c
//! Explicit deduction guide (not needed as of C++20) - "Key equivalence stuff" (?) from Switch BlockMap to use an unordered_set under the hood #19677
consteval refactor: Remove c_str from util/check #26960 (comment)concepts util: Allow std::byte and char Span serialization #27927 (comment)tracepoints: Disables-Wgnu-zero-variadic-macro-arguments
to compile without warnings #27401fuzz: Flatten all FUZZ_TARGET macros into one #28065 (comment)- serialize changes: net: Use serialization parameters for CAddress serialization #25284 (comment) net: Use serialization parameters for CAddress serialization #25284 (comment) and Discussion: Upgrading to C++20 #23363 (comment)
Overall this doesn't look like massive improvements, so switching to C++20 is probably low(est) priority.