From fe23ae5cd0d80c50b3408655a5ea172b10aa925f Mon Sep 17 00:00:00 2001 From: Georg Schwab Date: Thu, 23 Feb 2023 13:37:12 +0100 Subject: [PATCH 1/2] added expected::rebind --- include/tl/expected.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/tl/expected.hpp b/include/tl/expected.hpp index 7fd6467..cbd81e0 100644 --- a/include/tl/expected.hpp +++ b/include/tl/expected.hpp @@ -1283,9 +1283,10 @@ class expected : private detail::expected_move_assign_base, using ctor_base = detail::expected_default_ctor_base; public: - typedef T value_type; - typedef E error_type; - typedef unexpected unexpected_type; + using value_type T; + using error_type E; + using unexpected_type = unexpected; + template using rebind = expected; #if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \ !defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55) From cc2a03d8b05e67b7eb0424f18af7a0d5fa5a22a7 Mon Sep 17 00:00:00 2001 From: Georg Schwab Date: Thu, 23 Feb 2023 14:40:44 +0100 Subject: [PATCH 2/2] Fixed typos that resulted in compiler errors --- include/tl/expected.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tl/expected.hpp b/include/tl/expected.hpp index cbd81e0..33ef8d2 100644 --- a/include/tl/expected.hpp +++ b/include/tl/expected.hpp @@ -1283,8 +1283,8 @@ class expected : private detail::expected_move_assign_base, using ctor_base = detail::expected_default_ctor_base; public: - using value_type T; - using error_type E; + using value_type = T; + using error_type = E; using unexpected_type = unexpected; template using rebind = expected;