This use was introduced in #21365, but as pointed out in #22339, this causes compatibility problems.
Just avoid its use for now.
406 | @@ -407,7 +407,13 @@ void TaprootSpendData::Merge(TaprootSpendData other) 407 | merkle_root = other.merkle_root; 408 | } 409 | for (auto& [key, control_blocks] : other.scripts) { 410 | - scripts[key].merge(std::move(control_blocks)); 411 | + // Once P0083R3 is supported by all our targetted platforms,
test/lint/lint-spelling.sh
src/script/standard.cpp:410: targetted ==> targeted
Fixed.
ACK 3052341dfda688e0c9f4fea228024cdd5099d565
re-ACK 6cf4ea71878c0a83f2e49831e4dfa119c53761b7
ACK 6cf4ea71878c0a83f2e49831e4dfa119c53761b7
ACK 6cf4ea71878c0a83f2e49831e4dfa119c53761b7, successfully compiled on the following systems:
$ clang --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ make -C depends NO_QT=1 CC=clang-7 CXX='clang++-7 -stdlib=libc++'
$ ./autogen.sh && CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure -q --disable-tests --disable-bench CC=clang-7 CXX='clang++-7 -stdlib=libc++' && make clean > /dev/null
$ make
Should this be tagged for 22.0?
Before:
$ make V=1
Making all in src
make[1]: Entering directory '/bitcoin-core/src'
make[2]: Entering directory '/bitcoin-core/src'
make[3]: Entering directory '/bitcoin-core'
make[3]: Leaving directory '/bitcoin-core'
/usr/bin/ccache clang++-7 -stdlib=libc++ -std=c++17 -DHAVE_CONFIG_H -I. -I../src/config -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I. -I./secp256k1/include -I/bitcoin-core/depends/x86_64-pc-linux-gnu/include -I./leveldb/include -I./leveldb/helpers/memenv -I./univalue/include -I/bitcoin-core/depends/x86_64-pc-linux-gnu/include/ -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -DPROVIDE_FUZZ_MAIN_FUNCTION -fdebug-prefix-map=/bitcoin-core/src=. -Wstack-protector -fstack-protector-all -fPIE -pipe -O2 -MT script/libbitcoin_common_a-standard.o -MD -MP -MF script/.deps/libbitcoin_common_a-standard.Tpo -c -o script/libbitcoin_common_a-standard.o `test -f 'script/standard.cpp' || echo './'`script/standard.cpp
script/standard.cpp:410:22: error: no member named 'merge' in 'std::__1::set<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, ShortestVectorFirstComparator, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >'
scripts[key].merge(std::move(control_blocks));
~~~~~~~~~~~~ ^
1 error generated.
make[2]: *** [Makefile:8408: script/libbitcoin_common_a-standard.o] Error 1
make[2]: Leaving directory '/bitcoin-core/src'
make[1]: *** [Makefile:16141: all-recursive] Error 1
make[1]: Leaving directory '/bitcoin-core/src'
make: *** [Makefile:820: all-recursive] Error 1
After: (passes)
We probably could have almost left this as is for 22.0, #22339 also didn't cover the actual hard compatibility issue, which would have been needing to bump the minimum required macOS to 10.15. In any case, I think we can revert this for 0.23, as we are going to bump our macOS and lib(std)c++ requirements to use std::filesystem.