News for hackers. Stuff that matters.
Re:When noexcept? by brandmeyer on Thursday December 15, 2016 @12:28PM (#13186315)
GOOG is a big company, and not everyone handles this the same way. At least some teams are doing what the sibling mentioned: A static factory-like method that returns a discriminated union of either T or an error type. It is conceptually similar to std::variant<T, std::error_condition>, but syntactically optimized for this use case.
Re:When noexcept? by praptak on Thursday December 15, 2016 @01:34PM (#13186889)
Re:When noexcept? by brandmeyer on Thursday December 15, 2016 @02:24PM (#13187374)
Yep, that's the one.
Re:When noexcept? by user5994461 on Thursday December 15, 2016 @05:32PM (#13189238)
I tried to imagine the error message given by this template when something is written wrong. Just had a vision of horror.