Godbolt example
The following functions when used on optional<T&> of && fail to compile:
value();
operator*();
and_then();
transform();
- For
value() and operator*() it appears that the && and const && return the wrong type.
and_then() and transform() issues seem related to the above
- It appears there is missing test coverage for this too.
- Also
operator-> is wrong.
Obviously, since I'm the one that provided this implementation (apologies!), I'll work on fixing it.
Godbolt example
The following functions when used on
optional<T&>of&&fail to compile:value()andoperator*()it appears that the&&andconst &&return the wrong type.and_then()andtransform()issues seem related to the aboveoperator->is wrong.Obviously, since I'm the one that provided this implementation (apologies!), I'll work on fixing it.