cpp/types/numeric limits/has infinity

The value of is  for all types  capable of representing the positive infinity as a distinct special value. This constant is meaningful for all floating-point types and is guaranteed to be if.