but you need a way to indicate whether the data is valid or not and that requires either a  returning a bool and passing in a pointer  since passing a non const reference is against google style  or returning a copy and passing in a pointer to a bool  something which was explicitly rejected in a much earlier code review i do not honestly know of a third option 