mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Replace boost::variant with std::variant
This commit is contained in:
@@ -8,16 +8,12 @@
|
||||
#include <bech32.h>
|
||||
#include <util/strencodings.h>
|
||||
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
|
||||
namespace
|
||||
{
|
||||
class DestinationEncoder : public boost::static_visitor<std::string>
|
||||
namespace {
|
||||
class DestinationEncoder
|
||||
{
|
||||
private:
|
||||
const CChainParams& m_params;
|
||||
@@ -209,7 +205,7 @@ std::string EncodeExtKey(const CExtKey& key)
|
||||
|
||||
std::string EncodeDestination(const CTxDestination& dest)
|
||||
{
|
||||
return boost::apply_visitor(DestinationEncoder(Params()), dest);
|
||||
return std::visit(DestinationEncoder(Params()), dest);
|
||||
}
|
||||
|
||||
CTxDestination DecodeDestination(const std::string& str)
|
||||
|
||||
Reference in New Issue
Block a user