optional<T&&> was once proposed but withdrawn (#70). But I think it's still meaningful in monadic operations.
I guess we can re-introduce it with the construction from T&& disallowed. I think we introduce some helper functions to create them from existing optional<T> lvalues and optional<T&> values, which should avoid most dangling cases.
Additionally, optional<void> also seems to be meaningful in monadic operations (although not elsewhere).
optional<T&&>was once proposed but withdrawn (#70). But I think it's still meaningful in monadic operations.I guess we can re-introduce it with the construction from
T&&disallowed. I think we introduce some helper functions to create them from existingoptional<T>lvalues andoptional<T&>values, which should avoid most dangling cases.Additionally,
optional<void>also seems to be meaningful in monadic operations (although not elsewhere).