From c4e1d11f355adb28a352de6977fb90acd5035eb7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 19 Apr 2020 00:54:18 -0400 Subject: [PATCH] TypedVariant: Test --- hecl/include/hecl/TypedVariant.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hecl/include/hecl/TypedVariant.hpp b/hecl/include/hecl/TypedVariant.hpp index c43f9cac6..d548fe319 100644 --- a/hecl/include/hecl/TypedVariant.hpp +++ b/hecl/include/hecl/TypedVariant.hpp @@ -114,13 +114,13 @@ private: public: template static constexpr _TypedVariant Build(EnumType tp, _Args&&... args) { - return _TypedVariant::_Builder<_Types...>::template _BuildSkip<_Args...>(tp, std::forward<_Args>(args)...); + return _Builder<_Types...>::template _BuildSkip<_Args...>(tp, std::forward<_Args>(args)...); } template constexpr auto visit(_Visitor&& visitor, _Return&& def) { - return std::visit([&](auto& arg) { - using T = std::decay_t; + return std::visit([&](T0& arg) { + using T = std::decay_t; if constexpr (!T::is_monostate()) return visitor(arg); return def; @@ -129,8 +129,8 @@ public: template constexpr void visit(_Visitor&& visitor) { - std::visit([&](auto& arg) { - using T = std::decay_t; + std::visit([&](T0& arg) { + using T = std::decay_t; if constexpr (!T::is_monostate()) visitor(arg); }, static_cast(*this)); @@ -138,8 +138,8 @@ public: template constexpr auto visit(_Visitor&& visitor, _Return&& def) const { - return std::visit([&](const auto& arg) { - using T = std::decay_t; + return std::visit([&](const T0& arg) { + using T = std::decay_t; if constexpr (!T::is_monostate()) return visitor(arg); return def; @@ -148,8 +148,8 @@ public: template constexpr void visit(_Visitor&& visitor) const { - std::visit([&](const auto& arg) { - using T = std::decay_t; + std::visit([&](const T0& arg) { + using T = std::decay_t; if constexpr (!T::is_monostate()) visitor(arg); }, static_cast(*this));