commit 20d2df785cda701dcbb59572a035b97ca19e9409
parent 6b8c534bd3eb1aa7e6558fac4a1f3340bc5cda19
Author: cfillion <cfillion@users.noreply.github.com>
Date: Thu, 27 Sep 2018 20:17:09 -0400
migrate from boost::variant to C++17 std::variant
Diffstat:
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/version.cpp b/src/version.cpp
@@ -177,12 +177,12 @@ int VersionName::compare(const VersionName &o) const
for(size_t i = 0; i < biggest; i++) {
const Segment &lseg = segment(i);
- const Numeric *lnum = boost::get<Numeric>(&lseg);
- const string *lstr = boost::get<string>(&lseg);
+ const Numeric *lnum = get_if<Numeric>(&lseg);
+ const string *lstr = get_if<string>(&lseg);
const Segment &rseg = o.segment(i);
- const Numeric *rnum = boost::get<Numeric>(&rseg);
- const string *rstr = boost::get<string>(&rseg);
+ const Numeric *rnum = get_if<Numeric>(&rseg);
+ const string *rstr = get_if<string>(&rseg);
if(lnum && rnum) {
if(*lnum < *rnum)
diff --git a/src/version.hpp b/src/version.hpp
@@ -20,10 +20,10 @@
#include "time.hpp"
-#include <boost/variant.hpp>
#include <cstdint>
#include <map>
#include <set>
+#include <variant>
#include <vector>
class Package;
@@ -53,7 +53,7 @@ public:
private:
typedef uint16_t Numeric;
- typedef boost::variant<Numeric, std::string> Segment;
+ typedef std::variant<Numeric, std::string> Segment;
Segment segment(size_t i) const;
diff --git a/vendor/vcpkg-deps.txt b/vendor/vcpkg-deps.txt
@@ -1 +1 @@
-boost-algorithm boost-core boost-logic boost-mpl boost-preprocessor boost-range boost-signals2 boost-variant catch2 curl sqlite3
+boost-algorithm boost-core boost-logic boost-mpl boost-preprocessor boost-range boost-signals2 catch2 curl sqlite3