Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Aug 27, 2023

C++20 allows to write safer code, because it allows to enforce more stuff at compile time (constinit, conteval, constexpr, std::span, ...).

Also, it allows to write less verbose and easier to understand code (C++ 20 Concepts).

See #23363 and https://en.cppreference.com/w/cpp/compiler_support#cpp20

With g++-10 (#28348) and clang-13 (#28210), there is broad support for almost all features of C++20.

It should be fine to require a C++20 compiler for Bitcoin Core 27.0 in 2024 (next year), not the soon upcoming 26.0 next month.

This pull request includes three small cleanups to make use of C++20 features. If any issues are detected before or after merge, this should be easy to revert. If no issues arise, it should be fine to make use of more involved C++20 features later on.

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 27, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK fanquake

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #26593 (tracing: Only prepare tracepoint arguments when actually tracing by 0xB10C)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot DrahtBot changed the title build: Require C++20 compiler build: Require C++20 compiler Aug 27, 2023
@maflcko
Copy link
Member Author

maflcko commented Aug 27, 2023

Not sure why CI fails. Does ./depends/ support C++20?

@hebasto
Copy link
Member

hebasto commented Aug 27, 2023

Not sure why CI fails. Does ./depends/ support C++20?

--- a/depends/Makefile
+++ b/depends/Makefile
@@ -49,7 +49,7 @@ NO_HARDEN ?=
 FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
 
 C_STANDARD ?= c11
-CXX_STANDARD ?= c++17
+CXX_STANDARD ?= c++20
 
 BUILD = $(shell ./config.guess)
 HOST ?= $(BUILD)

?

@hebasto
Copy link
Member

hebasto commented Aug 27, 2023

https://cirrus-ci.com/task/5662608053764096:

g++: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?

funny...

@maflcko
Copy link
Member Author

maflcko commented Aug 27, 2023

Ok, looks like this is passing. The remaining errors should go away once and if this is rebased on the bump pull requests.

@hebasto
Copy link
Member

hebasto commented Aug 27, 2023

cirrus-ci.com/task/5662608053764096:

g++: error: unrecognized command line option '-std=c++20'; did you mean '-std=c++2a'?

funny...

It seems we should require GCC >= 10 first. See: https://gcc.gnu.org/projects/cxx-status.html.

@maflcko
Copy link
Member Author

maflcko commented Aug 27, 2023

It seems we should require GCC >= 10 first. See: https://gcc.gnu.org/projects/cxx-status.html.

Yes, I am aware, see the pull request description and my previous comment.

@ajtowns
Copy link
Contributor

ajtowns commented Aug 27, 2023

FWIW, I get a configure.ac error with clang 14 and libstdc++ 13 -- configure: error: cannot figure out how to use std::atomic. Seems to be due to clang not correctly implementing consteval prior to clang++-15. Using clang's libc++ (apt-get install libc++abi-dev libc++-dev and -stdlib=libc++) seems like it might fix it.

$ head -n31 build-aux/m4/l_atomic.m4  | tail -n19  > testing.cpp
$ clang++ -std=c++17 -stdlib=libc++ -o testing -Wall -W testing.cpp
$ clang++ -std=c++20 -stdlib=libc++ -o testing -Wall -W testing.cpp
$ clang++ -std=c++17 -o testing -Wall -W testing.cpp
$ clang++ -std=c++20 -o testing -Wall -W testing.cpp
In file included from testing.cpp:3:
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant expression
        static constexpr unsigned fractional_width = {_S_fractional_width()};
                                                      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: note: undefined function '_S_fractional_width' cannot be used in a constant expression
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2275:2: note: declared here
        _S_fractional_width()
        ^
1 error generated.
$ clang++-15 -std=c++20 -o testing -Wall -W testing.cpp
$ clang++ --version
Debian clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

@maflcko
Copy link
Member Author

maflcko commented Aug 27, 2023

FWIW, I get a configure.ac error with clang 14 and libstdc++ 13

Ugh, that seems like a blocker, given that clang-14 seems still to be the default for the current Debian stable (https://packages.debian.org/bookworm/clang) and even trixie (for now).

configure: error: cannot figure out how to use std::atomic

If this was the only error, I wonder if it will go away with the cmake transition, or if we can work around it, but I doubt it and expect almost any code to fail to compile.

@ajtowns
Copy link
Contributor

ajtowns commented Aug 27, 2023

If this was the only error, I wonder if it will go away with the cmake transition, or if we can work around it, but I doubt it and expect almost any code to fail to compile.

I think it's specific to atomic<chrono::duration> as specified in parts of gcc's libstdc++ headers bracketed by #if c++20... Could just decide we're not going to use atomic<duration>.

@ajtowns
Copy link
Contributor

ajtowns commented Aug 28, 2023

If this was the only error, I wonder if it will go away with the cmake transition, or if we can work around it, but I doubt it and expect almost any code to fail to compile.

I think it's specific to atomic<chrono::duration> as specified in parts of gcc's libstdc++ headers bracketed by #if c++20... Could just decide we're not going to use atomic<duration>.

Ah, it's worse than that -- clang++-14 can't deal with libstdc++'s chrono header at all in c++20 mode.

$ cat testing.cpp
#include <chrono>
int main() { return 0; }
$ clang++-14 -std=c++20 -o testing -Wall -W testing.cpp
In file included from testing.cpp:1:
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant expression
        static constexpr unsigned fractional_width = {_S_fractional_width()};

Using libc++ with CC=clang-14 CXX='env clang++-14 -stdlib=libc++' LDFLAGS='-stdlib=libc++' almost works, but Db::verify with clang's ostream isn't available for linking (using system libdb5.3++, not depends build):

/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-bdb.o): in function `wallet::BerkeleyDatabase::Verify(bilingual_str&)':
./src/./src/wallet/bdb.cpp:327:(.text+0x3367): undefined reference to `Db::verify(char const*, char const*, std::__1::basic_ostream<char, std::__1::char_traits<char> >*, unsigned int)'

@maflcko
Copy link
Member Author

maflcko commented Aug 28, 2023

Using libc++ with CC=clang-14 CXX='env clang++-14 -stdlib=libc++' LDFLAGS='-stdlib=libc++' almost works, but Db::verify with clang's ostream isn't available for linking (using system libdb5.3++, not depends build):

Yeah, that should be a known "issue", unrelated to C++20.

@maflcko
Copy link
Member Author

maflcko commented Aug 28, 2023

Ah, it's worse than that -- clang++-14 can't deal with libstdc++'s chrono header at all in c++20 mode.

So to clarify, this is only a bug with clang++-14 and libstdc++-13? If so, the only operating system that ships with this config is Debian 13 Trixie, which is your operating system? If so, I'd suggest to just fix it upstream by bumping the default clang version in Debian.

@ajtowns
Copy link
Contributor

ajtowns commented Aug 28, 2023

Using libc++ with CC=clang-14 CXX='env clang++-14 -stdlib=libc++' LDFLAGS='-stdlib=libc++' almost works, but Db::verify with clang's ostream isn't available for linking (using system libdb5.3++, not depends build):

Yeah, that should be a known "issue", unrelated to C++20.

Yeah... I guess we could do C++20 with the following options on linux:

  • gcc 10 or above should be fine
  • clang 15 or above should be fine
  • clang 13/14 -- use libc++ and depends build of libdb++

Probably want an autoconf macro to check for the latter case?

@maflcko
Copy link
Member Author

maflcko commented Aug 28, 2023

@maflcko
Copy link
Member Author

maflcko commented Aug 28, 2023

  • clang 13/14 -- use libc++ and depends build of libdb++

Probably want an autoconf macro to check for the latter case?

Sgtm, but maybe check the status of the autoconf and bdb removal before spending time on this? 😅

@ajtowns
Copy link
Contributor

ajtowns commented Aug 28, 2023

Ah, it's worse than that -- clang++-14 can't deal with libstdc++'s chrono header at all in c++20 mode.

So to clarify, this is only a bug with clang++-14 and libstdc++-13? If so, the only operating system that ships with this config is Debian 13 Trixie, which is your operating system? If so, I'd suggest to just fix it upstream by bumping the default clang version in Debian.

Yes, this seems correct! Seems like a non-problem then.

@fanquake fanquake added this to the 27.0 milestone Sep 26, 2023
@fanquake
Copy link
Member

fanquake commented Oct 2, 2023

Our depends version of Qt is also going to be a blocker here. We'll need to move along to a more recent point release for improved C++20 support.

@hebasto
Copy link
Member

hebasto commented Oct 2, 2023

Our depends version of Qt is also going to be a blocker here. We'll need to move along to a more recent point release for improved C++20 support.

Sorry if I missed something that was mentioned previously, but what is wrong in Qt 5.15.5 with C++20 support?

With this diff:

diff --git a/depends/Makefile b/depends/Makefile
index 3169117633..319c3498df 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -49,7 +49,7 @@ NO_HARDEN ?=
 FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
 
 C_STANDARD ?= c11
-CXX_STANDARD ?= c++17
+CXX_STANDARD ?= c++20
 
 BUILD = $(shell ./config.guess)
 HOST ?= $(BUILD)
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 136ce32579..ef30878e65 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -39,7 +39,7 @@ $(package)_config_opts_release += -silent
 $(package)_config_opts_debug = -debug
 $(package)_config_opts_debug += -optimized-tools
 $(package)_config_opts += -bindir $(build_prefix)/bin
-$(package)_config_opts += -c++std c++17
+$(package)_config_opts += -c++std c++2a
 $(package)_config_opts += -confirm-license
 $(package)_config_opts += -hostprefix $(build_prefix)
 $(package)_config_opts += -no-compile-examples

everything compiles. Did not test cross-compiling, however.

A quick look at https://github.com/qt/qtbase/compare/v5.15.5-lts-lgpl..v5.15.10-lts-lgpl shows that support for C++23 has been added. But we are talking about C++20, right?

@fanquake
Copy link
Member

fanquake commented Oct 2, 2023

Last I looked there were fixes since 5.15.5 that we needed, and things didn't work.

Did not test cross-compiling, however.

What do you mean by "everything"? Probably also worth checking cross-compilation before claiming it works?

@hebasto
Copy link
Member

hebasto commented Oct 2, 2023

Last I looked there were fixes since 5.15.5 that we needed, and things didn't work.

Why not just sharing known steps to reproduce "things didn't work"?

@fanquake
Copy link
Member

fanquake commented Oct 2, 2023

Because I tested it as part of a different change, months ago, and don't have a trivial reproducer on hand.

@fanquake
Copy link
Member

fanquake commented Oct 2, 2023

With this diff:
everything compiles.

The first thing I tested after applying your diff failed to compile. Master (fd8ab08) + #28543 + the diff above:

Build type: macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3 sse4.1)
Compiler: clang (Apple) 15.0.0
Configuration: sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl f16c largefile precompile_header rdrnd rdseed shani silent x86SimdAlways release c++11 c++14 c++17 c++1z c++2a reduce_exports static stl
Build options:
  Mode ................................... release
  Optimize release build for size ........ no
  Building shared libraries .............. no
  Using C standard ....................... C11
  Using C++ standard ..................... C++2a
  Using ccache ........................... no
<snip>
compiling ../../corelib/io/qdir.cpp
compiling ../../corelib/io/qdiriterator.cpp
../../corelib/global/qrandom.cpp:386:30: error: no member named 'is_literal_type' in namespace 'std'
        Q_STATIC_ASSERT(std::is_literal_type<SystemAndGlobalGenerators>::value);
                        ~~~~~^
../../../include/QtCore/../../src/corelib/global/qglobal.h:120:57: note: expanded from macro 'Q_STATIC_ASSERT'
#  define Q_STATIC_ASSERT(Condition) static_assert(bool(Condition), #Condition)
                                                        ^~~~~~~~~
../../corelib/global/qrandom.cpp:386:46: error: 'SystemAndGlobalGenerators' does not refer to a value
        Q_STATIC_ASSERT(std::is_literal_type<SystemAndGlobalGenerators>::value);
                                             ^
../../corelib/global/qrandom.cpp:350:26: note: declared here
struct QRandomGenerator::SystemAndGlobalGenerators
                         ^
../../corelib/global/qrandom.cpp:386:74: error: no member named 'value' in the global namespace
        Q_STATIC_ASSERT(std::is_literal_type<SystemAndGlobalGenerators>::value);
                                                                       ~~^
../../../include/QtCore/../../src/corelib/global/qglobal.h:120:57: note: expanded from macro 'Q_STATIC_ASSERT'
#  define Q_STATIC_ASSERT(Condition) static_assert(bool(Condition), #Condition)
                                                        ^~~~~~~~~
compiling ../../corelib/io/qfile.cpp
3 errors generated.

Looks like this was fixed upstream in qt/qtbase@df08a21, which we don't yet have until updating. Am I missing something?

@theuni
Copy link
Member

theuni commented Mar 1, 2024

This needs a release note imo.

@fanquake
Copy link
Member

fanquake commented Mar 4, 2024

Added rel-note todo to the draft wiki.

hebasto added a commit to hebasto/bitcoin that referenced this pull request Mar 17, 2024
This option has ceased to exist since bitcoin#28349.
fanquake added a commit that referenced this pull request Mar 18, 2024
64722e4 ci: Drop `--enable-c++20` option (Hennadii Stepanov)

Pull request description:

  This option has ceased to exist since #28349.

ACKs for top commit:
  maflcko:
    ACK 64722e4

Tree-SHA512: bd392c331f775605615e1b236682269b83a1e6363a4d3f09c4d8d54495cf3d22973a921ebf6b8a9f813ba6c024d3324761f3291aaf7f473995f5eaa4c195bc43
janus pushed a commit to BitgesellOfficial/bitgesell that referenced this pull request Apr 1, 2024
It is unclear what the goal of this check is, given that the value may
need to be set lower for the mimimum supported version of compilers that
forgot to bump the value, see
bitcoin/bitcoin#28349 (comment) .

The minimum supported compiler versions are already documented in
doc/dependencies.md and using an older compiler will already result in a
compile failure, so this check can be removed as redundant. Especially
given that it is only included in one file, where iwyu suggests to
remove it.
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Apr 4, 2024
fa6e50d fuzz: Use C++20 starts_with in rpc.cpp (MarcoFalke)
faa4838 Revert "tracepoints: Disables `-Wgnu-zero-variadic-macro-arguments` to compile without warnings" (MarcoFalke)
fae3b77 refactor: Drop unused _Pragma to ignore -Wgnu-zero-variadic-macro-arguments (MarcoFalke)
fa02fc0 refactor: modernize-use-default-member-init for bit-fields (C++20) (MarcoFalke)
fa67f09 build: Require C++20 compiler (MarcoFalke)

Pull request description:

  C++20 allows to write safer code, because it allows to enforce more stuff at compile time (`constinit`, `conteval`, `constexpr`, `std::span`, ...).

  Also, it allows to write less verbose and easier to understand code (C++ 20 Concepts).

  See bitcoin#23363 and https://en.cppreference.com/w/cpp/compiler_support#cpp20

  With g++-10 (bitcoin#28348) and clang-13 (bitcoin#28210), there is broad support for almost all features of C++20.

  It should be fine to require a C++20 compiler for Bitcoin Core 27.0 in 2024 (next year), not the soon upcoming 26.0 next month.

  This pull request includes three small cleanups to make use of C++20 features. If any issues are detected before or after merge, this should be easy to revert. If no issues arise, it should be fine to make use of more involved C++20 features later on.

ACKs for top commit:
  fanquake:
    ACK fa6e50d

Tree-SHA512: 244d79bfb0b750a4bdd713f40573b9ca33816fb84b6c84a58f027b9d7d4bb0cc4f18642959e4cf3d094808a69e5b8a327ca8521d7c0c08af27dacb5da3e78e71
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Apr 4, 2024
fa6e50d fuzz: Use C++20 starts_with in rpc.cpp (MarcoFalke)
faa4838 Revert "tracepoints: Disables `-Wgnu-zero-variadic-macro-arguments` to compile without warnings" (MarcoFalke)
fae3b77 refactor: Drop unused _Pragma to ignore -Wgnu-zero-variadic-macro-arguments (MarcoFalke)
fa02fc0 refactor: modernize-use-default-member-init for bit-fields (C++20) (MarcoFalke)
fa67f09 build: Require C++20 compiler (MarcoFalke)

Pull request description:

  C++20 allows to write safer code, because it allows to enforce more stuff at compile time (`constinit`, `conteval`, `constexpr`, `std::span`, ...).

  Also, it allows to write less verbose and easier to understand code (C++ 20 Concepts).

  See bitcoin#23363 and https://en.cppreference.com/w/cpp/compiler_support#cpp20

  With g++-10 (bitcoin#28348) and clang-13 (bitcoin#28210), there is broad support for almost all features of C++20.

  It should be fine to require a C++20 compiler for Bitcoin Core 27.0 in 2024 (next year), not the soon upcoming 26.0 next month.

  This pull request includes three small cleanups to make use of C++20 features. If any issues are detected before or after merge, this should be easy to revert. If no issues arise, it should be fine to make use of more involved C++20 features later on.

ACKs for top commit:
  fanquake:
    ACK fa6e50d

Tree-SHA512: 244d79bfb0b750a4bdd713f40573b9ca33816fb84b6c84a58f027b9d7d4bb0cc4f18642959e4cf3d094808a69e5b8a327ca8521d7c0c08af27dacb5da3e78e71
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Apr 4, 2024
janus pushed a commit to BitgesellOfficial/bitgesell that referenced this pull request Apr 6, 2024
This option has ceased to exist since bitcoin/bitcoin#28349.
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Apr 12, 2024
fa6e50d fuzz: Use C++20 starts_with in rpc.cpp (MarcoFalke)
faa4838 Revert "tracepoints: Disables `-Wgnu-zero-variadic-macro-arguments` to compile without warnings" (MarcoFalke)
fae3b77 refactor: Drop unused _Pragma to ignore -Wgnu-zero-variadic-macro-arguments (MarcoFalke)
fa02fc0 refactor: modernize-use-default-member-init for bit-fields (C++20) (MarcoFalke)
fa67f09 build: Require C++20 compiler (MarcoFalke)

Pull request description:

  C++20 allows to write safer code, because it allows to enforce more stuff at compile time (`constinit`, `conteval`, `constexpr`, `std::span`, ...).

  Also, it allows to write less verbose and easier to understand code (C++ 20 Concepts).

  See bitcoin#23363 and https://en.cppreference.com/w/cpp/compiler_support#cpp20

  With g++-10 (bitcoin#28348) and clang-13 (bitcoin#28210), there is broad support for almost all features of C++20.

  It should be fine to require a C++20 compiler for Bitcoin Core 27.0 in 2024 (next year), not the soon upcoming 26.0 next month.

  This pull request includes three small cleanups to make use of C++20 features. If any issues are detected before or after merge, this should be easy to revert. If no issues arise, it should be fine to make use of more involved C++20 features later on.

ACKs for top commit:
  fanquake:
    ACK fa6e50d

Tree-SHA512: 244d79bfb0b750a4bdd713f40573b9ca33816fb84b6c84a58f027b9d7d4bb0cc4f18642959e4cf3d094808a69e5b8a327ca8521d7c0c08af27dacb5da3e78e71
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Apr 23, 2024
fa6e50d fuzz: Use C++20 starts_with in rpc.cpp (MarcoFalke)
faa4838 Revert "tracepoints: Disables `-Wgnu-zero-variadic-macro-arguments` to compile without warnings" (MarcoFalke)
fae3b77 refactor: Drop unused _Pragma to ignore -Wgnu-zero-variadic-macro-arguments (MarcoFalke)
fa02fc0 refactor: modernize-use-default-member-init for bit-fields (C++20) (MarcoFalke)
fa67f09 build: Require C++20 compiler (MarcoFalke)

Pull request description:

  C++20 allows to write safer code, because it allows to enforce more stuff at compile time (`constinit`, `conteval`, `constexpr`, `std::span`, ...).

  Also, it allows to write less verbose and easier to understand code (C++ 20 Concepts).

  See bitcoin#23363 and https://en.cppreference.com/w/cpp/compiler_support#cpp20

  With g++-10 (bitcoin#28348) and clang-13 (bitcoin#28210), there is broad support for almost all features of C++20.

  It should be fine to require a C++20 compiler for Bitcoin Core 27.0 in 2024 (next year), not the soon upcoming 26.0 next month.

  This pull request includes three small cleanups to make use of C++20 features. If any issues are detected before or after merge, this should be easy to revert. If no issues arise, it should be fine to make use of more involved C++20 features later on.

ACKs for top commit:
  fanquake:
    ACK fa6e50d

Tree-SHA512: 244d79bfb0b750a4bdd713f40573b9ca33816fb84b6c84a58f027b9d7d4bb0cc4f18642959e4cf3d094808a69e5b8a327ca8521d7c0c08af27dacb5da3e78e71
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Apr 24, 2024
fa6e50d fuzz: Use C++20 starts_with in rpc.cpp (MarcoFalke)
faa4838 Revert "tracepoints: Disables `-Wgnu-zero-variadic-macro-arguments` to compile without warnings" (MarcoFalke)
fae3b77 refactor: Drop unused _Pragma to ignore -Wgnu-zero-variadic-macro-arguments (MarcoFalke)
fa02fc0 refactor: modernize-use-default-member-init for bit-fields (C++20) (MarcoFalke)
fa67f09 build: Require C++20 compiler (MarcoFalke)

Pull request description:

  C++20 allows to write safer code, because it allows to enforce more stuff at compile time (`constinit`, `conteval`, `constexpr`, `std::span`, ...).

  Also, it allows to write less verbose and easier to understand code (C++ 20 Concepts).

  See bitcoin#23363 and https://en.cppreference.com/w/cpp/compiler_support#cpp20

  With g++-10 (bitcoin#28348) and clang-13 (bitcoin#28210), there is broad support for almost all features of C++20.

  It should be fine to require a C++20 compiler for Bitcoin Core 27.0 in 2024 (next year), not the soon upcoming 26.0 next month.

  This pull request includes three small cleanups to make use of C++20 features. If any issues are detected before or after merge, this should be easy to revert. If no issues arise, it should be fine to make use of more involved C++20 features later on.

ACKs for top commit:
  fanquake:
    ACK fa6e50d

Tree-SHA512: 244d79bfb0b750a4bdd713f40573b9ca33816fb84b6c84a58f027b9d7d4bb0cc4f18642959e4cf3d094808a69e5b8a327ca8521d7c0c08af27dacb5da3e78e71
fanquake added a commit to fanquake/bitcoin that referenced this pull request Jun 5, 2024
Reverts part of fa67f09, now that we
require a minimum of GCC 11.

See also:
bitcoin#28349 (comment).
fanquake added a commit that referenced this pull request Jun 6, 2024
232928b build: no-longer allow GCC-10 in C++20 check (fanquake)

Pull request description:

  Reverts part of fa67f09, now that we require a minimum of GCC 11.

  See also:
  #28349 (comment).

ACKs for top commit:
  maflcko:
    utACK 232928b
  theuni:
    utACK 232928b

Tree-SHA512: 10e0adac2dd6e455aaf97ebfe73c7586430349fc27ac435bc6c0d99a4934a380398d14467aacd9cedf371345da291366b3ab2c3be7db5d97e21ad6212b2c7890
janus pushed a commit to BitgesellOfficial/bitgesell that referenced this pull request Jul 26, 2024
Reverts part of fa67f096bdea9db59dd20c470c9e32f3dac5be94, now that we
require a minimum of GCC 11.

See also:
bitcoin/bitcoin#28349 (comment).
kwvg added a commit to kwvg/dash that referenced this pull request Feb 8, 2025
kwvg added a commit to kwvg/dash that referenced this pull request Feb 8, 2025
kwvg added a commit to kwvg/dash that referenced this pull request Feb 9, 2025
kwvg added a commit to kwvg/dash that referenced this pull request Feb 12, 2025
PastaPastaPasta added a commit to dashpay/dash that referenced this pull request Feb 15, 2025
, bitcoin#28065, bitcoin#30228, partial bitcoin#28349, bitcoin#28579 (drop c++17 support)

c4b3dac refactor: make namespace `ranges` mostly an alias of `std::ranges` (Kittywhiskers Van Gogh)
a0e133e refactor: avoid convoluted casting by not using `std::time_t` (Kittywhiskers Van Gogh)
690a719 refactor: use `constexpr` `std::`{`copy`, `fill`} in `V2ShortIDs` (Kittywhiskers Van Gogh)
1269ac2 refactor: remove `rfind` workaround with `starts_with` (Kittywhiskers Van Gogh)
ceedabb merge bitcoin#30228: no-longer allow GCC-10 in C++20 check (Kittywhiskers Van Gogh)
213d548 partial bitcoin#28579: Remove redundant checks in compat/assumptions.h (Kittywhiskers Van Gogh)
ee7a6b4 partial bitcoin#28349: Require C++20 compiler (Kittywhiskers Van Gogh)
0c6a0bd fix: suppress deprecated-volatile in fuzz build (pasta)
e3638a3 ci: drop c++20-only build variant from GitHub and GitLab (Kittywhiskers Van Gogh)
c2c51f3 merge bitcoin#28065: Flatten all FUZZ_TARGET macros into one (Kittywhiskers Van Gogh)
28e93f5 merge bitcoin#27766: Change LIMIT_TO_MESSAGE_TYPE from a compile-time to a run-time setting (Kittywhiskers Van Gogh)
84d6a7c merge bitcoin#27672: Print error message when FUZZ is missing (Kittywhiskers Van Gogh)
1f4c0b5 merge bitcoin#24460: update ax_cxx_compile_stdcxx to serial 14 (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Depends on #6377

  * Depends on #6564

  * Using an existing namespace as an alias for a namespace part of the `std` namespace (as done in `ranges`) has been done before, see namespace `fs`, an alias to `std::filesystem` ([here](https://github.com/dashpay/dash/blob/396573d09cff5c65b2e3b4ba965185ac532b8b5c/src/fs.h#L18-L21)).

  * While the comment in `wallet.cpp` did mention that there would be a better way to do the cast than in C++17, the method to do so, using `std::chrono::clock_cast`, has still not been implemented in Clang ([source](https://stackoverflow.com/a/77540287)). The issue has been sidestepped by not using `std::time_t` at all and instead relying on `fs::file_time_type`, the type returned by `fs::last_write_time`.

  ## Breaking changes

  None expected.

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    light utACK c4b3dac
  UdjinM6:
    light ACK c4b3dac
  PastaPastaPasta:
    light ACK c4b3dac

Tree-SHA512: fe058815c1e3d424f050a5bddd5b335ba069c33f9e33c56197864be64106b38a47f9c3e7703e12c775170f0e7d458c141bff5f31c5e7c40557a0989a5469ad09
@bitcoin bitcoin locked and limited conversation to collaborators Mar 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants