You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin#20736: rpc: Replace boost::variant with std::variant for RPCArg.m_fallback
fa749fb rpc: Replace boost::variant with std::variant for RPCArg.m_fallback (MarcoFalke)
Pull request description:
Now that we can use std::variant from the vanilla standard library, drop the third-party boost variant dependency.
Patch is split out from bitcoin#20480. A step-by-step replacement is possible because we don't have our own `Variant` wrapper and the source code specifies `boost::variant` explicitly.
I think a step-by-step replacement should be preferred, because it simplifies review.
ACKs for top commit:
fjahr:
re-ACK fa749fb
Sjors:
re-ACK fa749fb
Tree-SHA512: 5e3c12b7d535f73065b4afa8df0a488f78fb25d2234f5ecbf740e624db03a34c35fea100eb7d37e84741721310e6450b7fb4296a2207a7ed1fa24485b3650981
Copy file name to clipboardExpand all lines: src/rpc/util.h
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
// Copyright (c) 2017-2020 The Bitcoin Core developers
1
+
// Copyright (c) 2017-2021 The Bitcoin Core developers
2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
@@ -19,10 +19,9 @@
19
19
#include<util/check.h>
20
20
21
21
#include<string>
22
+
#include<variant>
22
23
#include<vector>
23
24
24
-
#include<boost/variant.hpp>
25
-
26
25
/**
27
26
* String used to describe UNIX epoch time in documentation, factored out to a
28
27
* constant for consistency.
@@ -144,7 +143,7 @@ struct RPCArg {
144
143
*/
145
144
OMITTED,
146
145
};
147
-
using Fallback = boost::variant<Optional, /* default value for optional args */ std::string>;
146
+
using Fallback = std::variant<Optional, /* default value for optional args */ std::string>;
148
147
const std::string m_names; //!< The name of the arg (can be empty for inner args, can contain multiple aliases separated by | for named request arguments)
0 commit comments