From 32b343b866525567d6f2f90fff0449fef4dd12b0 Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Mon, 25 Mar 2019 15:31:01 +0000 Subject: [PATCH] VS 2019 Workaround Fixes #52 --- tl/expected.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tl/expected.hpp b/tl/expected.hpp index f22d41b..3299750 100644 --- a/tl/expected.hpp +++ b/tl/expected.hpp @@ -1224,7 +1224,7 @@ public: /// \synopsis template \nconstexpr auto and_then(F &&f) &; template TL_EXPECTED_11_CONSTEXPR auto - and_then(F &&f) & -> decltype(and_then_impl(*this, std::forward(f))) { + and_then(F &&f) & -> decltype(and_then_impl(std::declval(), std::forward(f))) { return and_then_impl(*this, std::forward(f)); } @@ -1232,7 +1232,7 @@ public: /// \synopsis template \nconstexpr auto and_then(F &&f) &&; template TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) && -> decltype( - and_then_impl(std::move(*this), std::forward(f))) { + and_then_impl(std::declval(), std::forward(f))) { return and_then_impl(std::move(*this), std::forward(f)); } @@ -1240,7 +1240,7 @@ public: /// \synopsis template \nconstexpr auto and_then(F &&f) const &; template constexpr auto and_then(F &&f) const & -> decltype( - and_then_impl(*this, std::forward(f))) { + and_then_impl(std::declval(), std::forward(f))) { return and_then_impl(*this, std::forward(f)); } @@ -1249,7 +1249,7 @@ public: /// \synopsis template \nconstexpr auto and_then(F &&f) const &&; template constexpr auto and_then(F &&f) const && -> decltype( - and_then_impl(std::move(*this), std::forward(f))) { + and_then_impl(std::declval(), std::forward(f))) { return and_then_impl(std::move(*this), std::forward(f)); } #endif