diff --git a/src/libs/utils/variant.h b/src/libs/utils/variant.h index 00e9eaf252a..371b9312d39 100644 --- a/src/libs/utils/variant.h +++ b/src/libs/utils/variant.h @@ -30,10 +30,25 @@ */ // TODO: replace by #include <(experimental/)variant> depending on compiler and C++ version +#if __cplusplus >= 201703L +#error Please delete variant.hpp and the #else section below, then remove this error +#include + +namespace Utils { +using std::get; +using std::get_if; +using std::holds_alternative; +using std::variant; +} // namespace Utils + +#else #include <3rdparty/variant/variant.hpp> namespace Utils { - -using namespace mpark; - +using mpark::get; +using mpark::get_if; +using mpark::holds_alternative; +using mpark::variant; } // namespace Utils + +#endif