— For c++ float, if you need a safe “invalid” value, there’s NaN, with standard support like std::isnana() etc
— For c++ int, you need to pick a actually-valid number like INT_MAX.
Q: How do you find a special value to indicate “variable has an invalid value”?
%%A: I think you need separate boolean flag.
A: boost::optional #NaN #a G9 boost construct is exactly designed for this