Generic Containers in C: Safe Division Using Maybe

(uecker.codeberg.page)

28 points | by uecker 3 hours ago ago

1 comments

  • nly an hour ago

    GCC generates essentially the same assembly for C++'s std::optional<int> with the exception that the result can't be returned in a register (a problem which will go away if the function is inlined)

    https://gcc.godbolt.org/z/vfzK9Toz4