15 May
2017
15 May
'17
11:13 p.m.
Gavin Lambert wrote:
I don't know if it would be worthwhile to try to optimise storage for that case. [result
]
An interesting point, because this is an argument in favor of returning by
value from result<>::value() - I can synthesize an optional<T> on demand
instead of storing one. (Return by reference mandates having an optional<>
object stored.)
Also applies to other possible combinations such as expected