What Are the Maximum Number of Base-10 Digits in the Integral Part of a Floating Point Number
<p>I want to know if there is something in the standard, like a <code>#define</code> or something in <code>numeric_limits</code> which would tell me the maximum number of base-10 digits in the integral part of a floating point type.</p>

<p>For example, if I have some floating point type the largest value of which is: 1234.567. I'd like something defined in the standard that would tell me 4 for that type.</p>

<p>Is there an option to me doing this?</p>

<pre><code>template &lt;typename T&gt;
constexpr auto integral_digits10 = static_cast&lt;int&gt;(log10(numeric_limits&lt;T&gt;::max())) + 1;
</code></pre>