C++ Logo

std-proposals

Advanced search

Re: P0323 std::expected - void value type?

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Mon, 5 Oct 2020 20:31:18 +0300
On Mon, 5 Oct 2020 at 20:25, DBJ <dbjdbj_at_[hidden]> wrote:
>
> I can't resist but repeat: it seems to me field from database theory
> is what that actually is: on separate level, field can be empty or not
> empty, and that level is decoupled from the level of states of value
> that might be inside the field. Empty Field is in that state (well
> described) "I really do not have a value I can produce". Ok this is
> wider in scope than just "what void is". Interesting.

That's exactly what void isn't, and what things like nullopt are. A
nullable database field
can report emptiness, whereas a function returning void isn't doing
even that. A "void"
database field would say "you can't query my value, that's an error".

Received on 2020-10-05 12:31:30