Replace boost with C++17 std equivalents, upgrade LZ4 to 1.10.0

- boost::tuple → std::tuple (serialize.h, miner.cpp, script.cpp, walletdb.cpp)
- boost::shared_ptr → std::shared_ptr (trianglesrpc.cpp)
- boost::variant → std::variant for CTxDestination (script.h)
- boost::get → std::get_if (main.cpp, rpcblockchain.cpp, coincontroldialog.cpp, wallet.cpp)
- boost::apply_visitor → std::visit (base58.h, script.cpp, rpcwallet.cpp, test/base58_tests.cpp)
- boost::static_visitor removed from all visitor classes
- boost::lexical_cast → std::to_string/std::stoll (smessage.cpp, rpcsmessage.cpp)
- Removed unused boost/lexical_cast.hpp includes (rest.cpp, trianglesrpc.cpp)
- Removed boost/variant/get.hpp include (rpcdump.cpp)
- Upgraded vendored LZ4 from 1.1.3 to 1.10.0
- Updated LZ4_compress() → LZ4_compress_default() (smessage.cpp)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 02:31:23 -07:00
parent 1a2793bb88
commit 7ceb1f6a4d
21 changed files with 3475 additions and 908 deletions
+6 -6
View File
@@ -5,7 +5,7 @@
#include "main.h"
#include "trianglesrpc.h"
#include <boost/lexical_cast.hpp>
#include <string>
#include "smessage.h"
#include "init.h" // pwalletMain
@@ -802,13 +802,13 @@ Value smsgbuckets(const Array& params, bool fHelp)
{
std::set<SecMsgToken>& tokenSet = it->second.setTokens;
std::string sBucket = boost::lexical_cast<std::string>(it->first);
std::string sBucket = std::to_string(it->first);
std::string sFile = sBucket + "_01.dat";
snprintf(cbuf, sizeof(cbuf), "%"PRIszu, tokenSet.size());
std::string snContents(cbuf);
std::string sHash = boost::lexical_cast<std::string>(it->second.hash);
std::string sHash = std::to_string(it->second.hash);
nBuckets++;
nMessages += tokenSet.size();
@@ -849,8 +849,8 @@ Value smsgbuckets(const Array& params, bool fHelp)
}; // LOCK(cs_smsg);
std::string snBuckets = boost::lexical_cast<std::string>(nBuckets);
std::string snMessages = boost::lexical_cast<std::string>(nMessages);
std::string snBuckets = std::to_string(nBuckets);
std::string snMessages = std::to_string(nMessages);
Object objM;
objM.push_back(Pair("buckets", snBuckets));
@@ -868,7 +868,7 @@ Value smsgbuckets(const Array& params, bool fHelp)
for (it = smsgBuckets.begin(); it != smsgBuckets.end(); ++it)
{
std::string sFile = boost::lexical_cast<std::string>(it->first) + "_01.dat";
std::string sFile = std::to_string(it->first) + "_01.dat";
try {
boost::filesystem::path fullPath = GetDataDir() / "smsgStore" / sFile;