Hacker News new | ask | show | jobs
by kllrnohj 1748 days ago
Why not a factory function that returns std::optional<T> instead? Or better a variant of T or error code?

The construct-then-init pattern is so annoying to deal with.