Open sipa opened 2 years ago
The codebase in several places uses constructions like functions that return a bool to communicate success/failure, and then actually put their output in a by-ref argument, e.g.:
template<typename Ctx> bool ToString(const Ctx& ctx, std::string& ret) const
With the code now using C++17, I think those should be retrofitted to use std::optional instead:
std::optional
template<typename Ctx> std::optional<std::string> ToString(const Ctx& ctx) const
(and many other examples)
The codebase in several places uses constructions like functions that return a bool to communicate success/failure, and then actually put their output in a by-ref argument, e.g.:
With the code now using C++17, I think those should be retrofitted to use
std::optional
instead:(and many other examples)