I hope runtime safe `numeric_cast` can be added to standard library header <numeric>.
The boost library has already got such feature, I wonder if there is already a proposal to merge it into the next standard?
Before I searched and reached Boost::numeric_cast, I reinvented the wheel, together with some other helper functions. More technical details are written in markdown at:
Both ideas are at the "Float the idea" stage, all the code and text are in early draft condition. They will be update and improve gradually.
Thank you and looking forwards to feedback.