From 80eb00711bd5f46e147ead7e2a6fee26c8b6340c Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:10:22 +0800 Subject: [PATCH] fix(variant): use mpark:xxx --- tile/base/future/boxed.h | 4 ++-- tile/base/future/core.h | 2 +- tile/base/variant.h | 8 -------- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/tile/base/future/boxed.h b/tile/base/future/boxed.h index 8ad461f..d168e75 100644 --- a/tile/base/future/boxed.h +++ b/tile/base/future/boxed.h @@ -89,7 +89,7 @@ private: } private: - std::variant holding_; + mpark::variant holding_; }; static_assert(std::is_void>().Get())>::value, ""); @@ -110,7 +110,7 @@ RetrieveBoxed() template template -Boxed::Boxed(box_values_t, Us &&...imms) : holding_(std::in_place_index_t(), std::forward(imms)...) +Boxed::Boxed(box_values_t, Us &&...imms) : holding_(mpark::in_place_index_t(), std::forward(imms)...) {} template diff --git a/tile/base/future/core.h b/tile/base/future/core.h index e10e8db..97b4829 100644 --- a/tile/base/future/core.h +++ b/tile/base/future/core.h @@ -43,7 +43,7 @@ private: private: // std::mutex lock_; Mutex lock_; - std::variant state_; + mpark::variant state_; Executor executor_; }; diff --git a/tile/base/variant.h b/tile/base/variant.h index a764f46..894971f 100644 --- a/tile/base/variant.h +++ b/tile/base/variant.h @@ -3,14 +3,6 @@ #pragma once -#if __cplusplus >= 201703L -#include -#else #include "tile/base/internal/variant.h" -namespace std { -using namespace mpark; -} -#endif - #endif// TILE_BASE_VARIANT_H