Skip to content

Commit 3cc14f5

Browse files
committed
feat: add template expected<T, E>::rebind<U>
1 parent c2a6d6a commit 3cc14f5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/zeus/expected.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,9 @@ class expected
11941194
typedef E error_type;
11951195
typedef unexpected<E> unexpected_type;
11961196

1197+
template<class U>
1198+
using rebind = expected<U, error_type>;
1199+
11971200
// default constructors
11981201

11991202
constexpr expected() = default;
@@ -2143,6 +2146,9 @@ class expected<void, E>
21432146
typedef E error_type;
21442147
typedef unexpected<E> unexpected_type;
21452148

2149+
template<class U>
2150+
using rebind = expected<U, error_type>;
2151+
21462152
constexpr expected() = default;
21472153
constexpr expected(const expected &rhs) = default;
21482154
constexpr expected(expected &&rhs) = default;

0 commit comments

Comments
 (0)