6

Article by Çağlayan Dökme

you are viewing a single comment's thread
view the rest of the comments
[-] phirus@feddit.de 0 points 1 year ago

I also like to use std::optional if a function may not return a result so I won't have to return a pointer, that might be a nullptr.

And std::variant as a typesafe less hacky union.

[-] Nihili0@programming.dev 1 points 1 year ago

I agree, I'm also hyped by std::expected, though it's C++23, so it will be quite some time before we can use it in production but still, it can easily be added as it's just a class.

this post was submitted on 17 Jun 2023
6 points (100.0% liked)

C++

1732 readers
1 users here now

The center for all discussion and news regarding C++.

Rules

founded 1 year ago
MODERATORS