prefer std::optional<T> over std::pair<bool, T>
replace std::pair<bool, T>
with std::optional<T>
and adapt code.
Also, avoid looking up the same thing twice...
Edited by Gerhard Raven
replace std::pair<bool, T>
with std::optional<T>
and adapt code.
Also, avoid looking up the same thing twice...