Fix OkOrFail<status_t> conversion ambiguities
OkOrFail<status_t> has specialized conversions for Result<int, StatusT> to avoid ambiguous implicit conversion sequences. Since user conversion operators sequences can be followed by integral promotion, specializing for integral types is necessary. Specialize ResultError<StatusT> so calling code() returns a status_t instead of a StatusT and message() is implemented even when not carrying a string. Eventually, these classes should be combined. Add equality operators for ResultError<StatusT>. Bug: 219580167 Test: atest Errors_test.cpp Merged-In: I14acecfd2aef33c40e79ddb091e2f4af9291d837 Change-Id: Ifb5ed3c2d3452b10901e4aeb19368d873225d9ce
Loading
Please register or sign in to comment