C++ Logo


Advanced search

Re: [std-proposals] Shorter spelling for std::numeric_limits<float>::infinity()

From: Jan Schultke <janschultke_at_[hidden]>
Date: Fri, 8 Mar 2024 22:17:13 +0100
What's the point? std::numeric_limits<T>::infinity() doesn't seem
substantially longer than std::numbers::infinity_v<T> to me.

If you end up using it a lot, you can make a constant like:
> inline constexpr double inf = std::numeric_limits<double>::infinity();

Received on 2024-03-08 21:17:26